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
e13a7857
Commit
e13a7857
authored
Apr 04, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Use a separate device for zwriteenable_test().
parent
bfb39bee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
15 deletions
+38
-15
visual.c
dlls/d3d9/tests/visual.c
+38
-15
No files found.
dlls/d3d9/tests/visual.c
View file @
e13a7857
...
@@ -11549,22 +11549,40 @@ done:
...
@@ -11549,22 +11549,40 @@ done:
DestroyWindow
(
window
);
DestroyWindow
(
window
);
}
}
static
void
zwriteenable_test
(
IDirect3DDevice9
*
device
)
{
static
void
zwriteenable_test
(
void
)
{
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d
;
D3DCOLOR
color
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
color
;
struct
vertex
quad1
[]
=
{
static
const
struct
vertex
quad1
[]
=
{
-
1
.
0
,
-
1
.
0
,
0
.
1
,
0x00ff0000
},
{
{
-
1
.
0
,
1
.
0
,
0
.
1
,
0x00ff0000
},
{
-
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
{
1
.
0
,
-
1
.
0
,
0
.
1
,
0x00ff0000
},
{
-
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
{
1
.
0
,
1
.
0
,
0
.
1
,
0x00ff0000
},
{
1
.
0
f
,
-
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
{
1
.
0
f
,
1
.
0
f
,
0
.
1
f
,
0x00ff0000
},
};
};
struct
vertex
quad2
[]
=
{
static
const
struct
vertex
quad2
[]
=
{
-
1
.
0
,
-
1
.
0
,
0
.
9
,
0x0000ff00
},
{
{
-
1
.
0
,
1
.
0
,
0
.
9
,
0x0000ff00
},
{
-
1
.
0
f
,
-
1
.
0
f
,
0
.
9
f
,
0x0000ff00
},
{
1
.
0
,
-
1
.
0
,
0
.
9
,
0x0000ff00
},
{
-
1
.
0
f
,
1
.
0
f
,
0
.
9
f
,
0x0000ff00
},
{
1
.
0
,
1
.
0
,
0
.
9
,
0x0000ff00
},
{
1
.
0
f
,
-
1
.
0
f
,
0
.
9
f
,
0x0000ff00
},
{
1
.
0
f
,
1
.
0
f
,
0
.
9
f
,
0x0000ff00
},
};
};
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
|
D3DCLEAR_ZBUFFER
,
0x000000ff
,
1
.
0
f
,
0
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
|
D3DCLEAR_ZBUFFER
,
0x000000ff
,
1
.
0
f
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with 0x%08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with 0x%08x
\n
"
,
hr
);
...
@@ -11576,6 +11594,8 @@ static void zwriteenable_test(IDirect3DDevice9 *device) {
...
@@ -11576,6 +11594,8 @@ static void zwriteenable_test(IDirect3DDevice9 *device) {
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed with 0x%08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed with 0x%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_ZFUNC
,
D3DCMP_LESSEQUAL
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_ZFUNC
,
D3DCMP_LESSEQUAL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed with 0x%08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed with 0x%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_LIGHTING
,
FALSE
);
ok
(
SUCCEEDED
(
hr
),
"Failed to disable lighting, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_BeginScene
(
device
);
hr
=
IDirect3DDevice9_BeginScene
(
device
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_BeginScene failed with 0x%08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_BeginScene failed with 0x%08x
\n
"
,
hr
);
...
@@ -11604,8 +11624,11 @@ static void zwriteenable_test(IDirect3DDevice9 *device) {
...
@@ -11604,8 +11624,11 @@ static void zwriteenable_test(IDirect3DDevice9 *device) {
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_Present failed with 0x%08x
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_Present failed with 0x%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetRenderState
(
device
,
D3DRS_ZENABLE
,
D3DZB_FALSE
);
refcount
=
IDirect3DDevice9_Release
(
device
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_SetRenderState failed with 0x%08x
\n
"
,
hr
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
window
);
}
}
static
void
alphatest_test
(
void
)
static
void
alphatest_test
(
void
)
...
@@ -16444,11 +16467,11 @@ START_TEST(visual)
...
@@ -16444,11 +16467,11 @@ START_TEST(visual)
np2_stretch_rect_test
(
device_ptr
);
np2_stretch_rect_test
(
device_ptr
);
yuv_color_test
(
device_ptr
);
yuv_color_test
(
device_ptr
);
yuv_layout_test
(
device_ptr
);
yuv_layout_test
(
device_ptr
);
zwriteenable_test
(
device_ptr
);
cleanup_device
(
device_ptr
);
cleanup_device
(
device_ptr
);
device_ptr
=
NULL
;
device_ptr
=
NULL
;
zwriteenable_test
();
alphatest_test
();
alphatest_test
();
viewport_test
();
viewport_test
();
test_constant_clamp_vs
();
test_constant_clamp_vs
();
...
...
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