Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
544fd16c
Commit
544fd16c
authored
Jan 10, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Try to avoid killing the Intel (kernel) driver.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
05f9b023
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
228 additions
and
120 deletions
+228
-120
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+63
-34
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+63
-34
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+51
-26
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+51
-26
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
544fd16c
...
...
@@ -81,6 +81,60 @@ static BOOL compare_vec4(const struct vec4 *vec, float x, float y, float z, floa
&&
compare_float
(
vec
->
w
,
w
,
ulps
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
BOOL
ddraw_is_intel
(
IDirectDraw
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
identifier
.
dwVendorId
==
0x8086
;
}
static
IDirectDrawSurface
*
create_overlay
(
IDirectDraw
*
ddraw
,
unsigned
int
width
,
unsigned
int
height
,
DWORD
format
)
{
...
...
@@ -4208,6 +4262,15 @@ static void test_flip(void)
for
(
i
=
0
;
i
<
sizeof
(
test_data
)
/
sizeof
(
*
test_data
);
++
i
)
{
/* Creating a flippable texture induces a BSoD on some versions of the
* Intel graphics driver. At least Intel GMA 950 with driver version
* 6.14.10.4926 on Windows XP SP3 is affected. */
if
((
test_data
[
i
].
caps
&
DDSCAPS_TEXTURE
)
&&
ddraw_is_intel
(
ddraw
))
{
win_skip
(
"Skipping flippable texture test.
\n
"
);
continue
;
}
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
;
...
...
@@ -5329,23 +5392,6 @@ static void test_palette_complex(void)
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
void
test_p8_blit
(
void
)
{
IDirectDrawSurface
*
src
,
*
dst
,
*
dst_p8
;
...
...
@@ -7626,23 +7672,6 @@ done:
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
void
test_colorkey_precision
(
void
)
{
static
D3DTLVERTEX
quad
[]
=
...
...
dlls/ddraw/tests/ddraw2.c
View file @
544fd16c
...
...
@@ -83,6 +83,60 @@ static BOOL compare_vec4(const struct vec4 *vec, float x, float y, float z, floa
&&
compare_float
(
vec
->
w
,
w
,
ulps
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw2
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw2
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
BOOL
ddraw_is_intel
(
IDirectDraw2
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
identifier
.
dwVendorId
==
0x8086
;
}
static
IDirectDrawSurface
*
create_overlay
(
IDirectDraw2
*
ddraw
,
unsigned
int
width
,
unsigned
int
height
,
DWORD
format
)
{
...
...
@@ -4838,6 +4892,15 @@ static void test_flip(void)
for
(
i
=
0
;
i
<
sizeof
(
test_data
)
/
sizeof
(
*
test_data
);
++
i
)
{
/* Creating a flippable texture induces a BSoD on some versions of the
* Intel graphics driver. At least Intel GMA 950 with driver version
* 6.14.10.4926 on Windows XP SP3 is affected. */
if
((
test_data
[
i
].
caps
&
DDSCAPS_TEXTURE
)
&&
ddraw_is_intel
(
ddraw
))
{
win_skip
(
"Skipping flippable texture test.
\n
"
);
continue
;
}
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
;
...
...
@@ -6386,23 +6449,6 @@ static void test_palette_complex(void)
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw2
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
void
test_p8_blit
(
void
)
{
IDirectDrawSurface
*
src
,
*
dst
,
*
dst_p8
;
...
...
@@ -8785,23 +8831,6 @@ done:
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw2
*
ddraw
)
{
IDirectDraw4
*
ddraw4
;
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirectDraw4
,
(
void
**
)
&
ddraw4
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get IDirectDraw4 interface, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw4
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
IDirectDraw4_Release
(
ddraw4
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
void
test_colorkey_precision
(
void
)
{
static
D3DLVERTEX
quad
[]
=
...
...
dlls/ddraw/tests/ddraw4.c
View file @
544fd16c
...
...
@@ -92,6 +92,48 @@ static BOOL compare_color(D3DCOLOR c1, D3DCOLOR c2, BYTE max_diff)
return
TRUE
;
}
static
BOOL
ddraw_is_warp
(
IDirectDraw4
*
ddraw
)
{
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw4
*
ddraw
)
{
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
BOOL
ddraw_is_intel
(
IDirectDraw4
*
ddraw
)
{
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
identifier
.
dwVendorId
==
0x8086
;
}
static
IDirectDrawSurface4
*
create_overlay
(
IDirectDraw4
*
ddraw
,
unsigned
int
width
,
unsigned
int
height
,
DWORD
format
)
{
...
...
@@ -6128,6 +6170,15 @@ static void test_flip(void)
for
(
i
=
0
;
i
<
sizeof
(
test_data
)
/
sizeof
(
*
test_data
);
++
i
)
{
/* Creating a flippable texture induces a BSoD on some versions of the
* Intel graphics driver. At least Intel GMA 950 with driver version
* 6.14.10.4926 on Windows XP SP3 is affected. */
if
((
test_data
[
i
].
caps
&
DDSCAPS_TEXTURE
)
&&
ddraw_is_intel
(
ddraw
))
{
win_skip
(
"Skipping flippable texture test.
\n
"
);
continue
;
}
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
;
...
...
@@ -7883,19 +7934,6 @@ static void test_palette_complex(void)
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw4
*
ddraw
)
{
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
void
test_p8_blit
(
void
)
{
IDirectDrawSurface4
*
src
,
*
dst
,
*
dst_p8
;
...
...
@@ -9890,19 +9928,6 @@ static void test_texcoordindex(void)
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw4
*
ddraw
)
{
DDDEVICEIDENTIFIER
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw4_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
void
test_colorkey_precision
(
void
)
{
static
struct
...
...
dlls/ddraw/tests/ddraw7.c
View file @
544fd16c
...
...
@@ -102,6 +102,48 @@ static ULONG get_refcount(IUnknown *iface)
return
IUnknown_Release
(
iface
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw7
*
ddraw
)
{
DDDEVICEIDENTIFIER2
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw7_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw7
*
ddraw
)
{
DDDEVICEIDENTIFIER2
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw7_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
BOOL
ddraw_is_intel
(
IDirectDraw7
*
ddraw
)
{
DDDEVICEIDENTIFIER2
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw7_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
identifier
.
dwVendorId
==
0x8086
;
}
static
IDirectDrawSurface7
*
create_overlay
(
IDirectDraw7
*
ddraw
,
unsigned
int
width
,
unsigned
int
height
,
DWORD
format
)
{
...
...
@@ -5994,6 +6036,15 @@ static void test_flip(void)
for
(
i
=
0
;
i
<
sizeof
(
test_data
)
/
sizeof
(
*
test_data
);
++
i
)
{
/* Creating a flippable texture induces a BSoD on some versions of the
* Intel graphics driver. At least Intel GMA 950 with driver version
* 6.14.10.4926 on Windows XP SP3 is affected. */
if
((
test_data
[
i
].
caps
&
DDSCAPS_TEXTURE
)
&&
ddraw_is_intel
(
ddraw
))
{
win_skip
(
"Skipping flippable texture test.
\n
"
);
continue
;
}
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
surface_desc
.
dwFlags
=
DDSD_CAPS
;
...
...
@@ -7791,19 +7842,6 @@ static void test_palette_complex(void)
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_warp
(
IDirectDraw7
*
ddraw
)
{
DDDEVICEIDENTIFIER2
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw7_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
!!
strstr
(
identifier
.
szDriver
,
"warp"
);
}
static
void
test_p8_blit
(
void
)
{
IDirectDrawSurface7
*
src
,
*
dst
,
*
dst_p8
;
...
...
@@ -10221,19 +10259,6 @@ static void test_texcoordindex(void)
DestroyWindow
(
window
);
}
static
BOOL
ddraw_is_nvidia
(
IDirectDraw7
*
ddraw
)
{
DDDEVICEIDENTIFIER2
identifier
;
HRESULT
hr
;
if
(
!
strcmp
(
winetest_platform
,
"wine"
))
return
FALSE
;
hr
=
IDirectDraw7_GetDeviceIdentifier
(
ddraw
,
&
identifier
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get device identifier, hr %#x.
\n
"
,
hr
);
return
identifier
.
dwVendorId
==
0x10de
;
}
static
void
test_colorkey_precision
(
void
)
{
static
struct
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment