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
32919f40
Commit
32919f40
authored
Apr 11, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Use a separate device for clear_test().
parent
e3383d17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
visual.c
dlls/d3d9/tests/visual.c
+22
-2
No files found.
dlls/d3d9/tests/visual.c
View file @
32919f40
...
...
@@ -470,7 +470,7 @@ static void lighting_test(IDirect3DDevice9 *device)
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetMaterial returned %08x
\n
"
,
hr
);
}
static
void
clear_test
(
IDirect3DDevice9
*
device
)
static
void
clear_test
(
void
)
{
/* Tests the correctness of clearing parameters */
HRESULT
hr
;
...
...
@@ -481,6 +481,20 @@ static void clear_test(IDirect3DDevice9 *device)
RECT
scissor
;
DWORD
oldColorWrite
;
BOOL
invalid_clear_failed
=
FALSE
;
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d
;
ULONG
refcount
;
HWND
window
;
window
=
CreateWindowA
(
"static"
,
"d3d9_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate9
(
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
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffffffff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %08x
\n
"
,
hr
);
...
...
@@ -717,6 +731,12 @@ static void clear_test(IDirect3DDevice9 *device)
"Clear with count = 1, rect = NULL has color %08x
\n
"
,
color
);
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
refcount
=
IDirect3DDevice9_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
window
);
}
static
void
color_fill_test
(
void
)
...
...
@@ -16747,11 +16767,11 @@ START_TEST(visual)
depth_clamp_test
(
device_ptr
);
stretchrect_test
(
device_ptr
);
lighting_test
(
device_ptr
);
clear_test
(
device_ptr
);
cleanup_device
(
device_ptr
);
device_ptr
=
NULL
;
clear_test
();
color_fill_test
();
fog_test
();
test_cube_wrap
();
...
...
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