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
00630f67
Commit
00630f67
authored
Apr 21, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Use a separate device for clear_test().
parent
322e6dd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
visual.c
dlls/d3d8/tests/visual.c
+24
-5
No files found.
dlls/d3d8/tests/visual.c
View file @
00630f67
...
...
@@ -297,13 +297,26 @@ static void lighting_test(IDirect3DDevice8 *device)
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_SetRenderState returned %#08x
\n
"
,
hr
);
}
static
void
clear_test
(
IDirect3DDevice8
*
device
)
static
void
clear_test
(
void
)
{
/* Tests the correctness of clearing parameters */
D3DRECT
rect_negneg
,
rect
[
2
];
IDirect3DDevice8
*
device
;
IDirect3D8
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
D3DRECT
rect
[
2
];
D3DRECT
rect_negneg
;
DWORD
color
;
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
,
0xffffffff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice8_Clear failed with %#08x
\n
"
,
hr
);
...
...
@@ -370,6 +383,12 @@ static void clear_test(IDirect3DDevice8 *device)
"Clear with count = 1, rect = NULL has color %#08x
\n
"
,
color
);
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
refcount
=
IDirect3DDevice8_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
}
static
void
fog_test
(
void
)
...
...
@@ -4980,7 +4999,6 @@ START_TEST(visual)
test_sanity
(
device_ptr
);
depth_clamp_test
(
device_ptr
);
lighting_test
(
device_ptr
);
clear_test
(
device_ptr
);
refcount
=
IDirect3DDevice8_Release
(
device_ptr
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
...
...
@@ -4988,6 +5006,7 @@ cleanup:
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
clear_test
();
fog_test
();
z_range_test
();
offscreen_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