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
a8248847
Commit
a8248847
authored
Apr 22, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Use a separate device for test_sanity().
parent
25d2de7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
visual.c
dlls/d3d8/tests/visual.c
+22
-18
No files found.
dlls/d3d8/tests/visual.c
View file @
a8248847
...
...
@@ -152,11 +152,25 @@ struct nvertex
DWORD
diffuse
;
};
static
void
test_sanity
(
IDirect3DDevice8
*
device
)
static
void
test_sanity
(
void
)
{
IDirect3DDevice8
*
device
;
IDirect3D8
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
ok
(
!!
d3d
,
"Failed to create a D3D object.
\n
"
);
if
(
!
(
device
=
create_device
(
d3d
,
window
,
window
,
TRUE
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
}
hr
=
IDirect3DDevice8_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffff0000
,
1
.
0
f
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to clear, hr %#x.
\n
"
,
hr
);
color
=
getPixelColor
(
device
,
1
,
1
);
...
...
@@ -172,6 +186,12 @@ static void test_sanity(IDirect3DDevice8 *device)
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to present, hr %#x.
\n
"
,
hr
);
refcount
=
IDirect3DDevice8_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
}
static
void
lighting_test
(
void
)
...
...
@@ -4997,10 +5017,7 @@ done:
START_TEST
(
visual
)
{
D3DADAPTER_IDENTIFIER8
identifier
;
IDirect3DDevice8
*
device_ptr
;
IDirect3D8
*
d3d
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
if
(
!
(
d3d
=
Direct3DCreate8
(
D3D_SDK_VERSION
)))
...
...
@@ -5020,22 +5037,9 @@ START_TEST(visual)
HIWORD
(
U
(
identifier
.
DriverVersion
).
HighPart
),
LOWORD
(
U
(
identifier
.
DriverVersion
).
HighPart
),
HIWORD
(
U
(
identifier
.
DriverVersion
).
LowPart
),
LOWORD
(
U
(
identifier
.
DriverVersion
).
LowPart
));
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
(
device_ptr
=
create_device
(
d3d
,
window
,
window
,
TRUE
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
cleanup
;
}
test_sanity
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
cleanup
:
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
test_sanity
();
depth_clamp_test
();
lighting_test
();
clear_test
();
...
...
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