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
3783c5c0
Commit
3783c5c0
authored
Sep 10, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Add a test for auto depth stencil reset.
parent
8a77aa03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
device.c
dlls/d3d9/tests/device.c
+28
-0
No files found.
dlls/d3d9/tests/device.c
View file @
3783c5c0
...
...
@@ -744,6 +744,8 @@ static void test_reset(void)
d3dpp
.
BackBufferWidth
=
800
;
d3dpp
.
BackBufferHeight
=
600
;
d3dpp
.
BackBufferFormat
=
d3ddm
.
Format
;
d3dpp
.
EnableAutoDepthStencil
=
TRUE
;
d3dpp
.
AutoDepthStencilFormat
=
D3DFMT_D24S8
;
for
(
i
=
0
;
i
<
IDirect3D9_GetAdapterModeCount
(
pD3d
,
D3DADAPTER_DEFAULT
,
d3ddm
.
Format
);
i
++
)
{
ZeroMemory
(
&
d3ddm2
,
sizeof
(
d3ddm2
)
);
...
...
@@ -924,6 +926,32 @@ static void test_reset(void)
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x
\n
"
,
hr
);
IDirect3DSurface9_Release
(
surface
);
/* The depth stencil should get reset to the auto depth stencil when present. */
hr
=
IDirect3DDevice9_SetDepthStencilSurface
(
pDevice
,
NULL
);
ok
(
hr
==
D3D_OK
,
"SetDepthStencilSurface failed with 0x%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetDepthStencilSurface
(
pDevice
,
&
surface
);
ok
(
hr
==
D3DERR_NOTFOUND
,
"GetDepthStencilSurface returned 0x%08x, expected D3DERR_NOTFOUND
\n
"
,
hr
);
ok
(
surface
==
NULL
,
"Depth stencil should be NULL
\n
"
);
d3dpp
.
EnableAutoDepthStencil
=
TRUE
;
d3dpp
.
AutoDepthStencilFormat
=
D3DFMT_D24S8
;
hr
=
IDirect3DDevice9_Reset
(
pDevice
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Reset failed with 0x%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetDepthStencilSurface
(
pDevice
,
&
surface
);
ok
(
hr
==
D3D_OK
,
"GetDepthStencilSurface failed with 0x%08x
\n
"
,
hr
);
ok
(
surface
!=
NULL
,
"Depth stencil should not be NULL
\n
"
);
if
(
surface
)
IDirect3DSurface9_Release
(
surface
);
d3dpp
.
EnableAutoDepthStencil
=
FALSE
;
hr
=
IDirect3DDevice9_Reset
(
pDevice
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Reset failed with 0x%08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetDepthStencilSurface
(
pDevice
,
&
surface
);
ok
(
hr
==
D3DERR_NOTFOUND
,
"GetDepthStencilSurface returned 0x%08x, expected D3DERR_NOTFOUND
\n
"
,
hr
);
ok
(
surface
==
NULL
,
"Depth stencil should be NULL
\n
"
);
/* Will a sysmem or scratch survive while locked */
hr
=
IDirect3DDevice9_CreateOffscreenPlainSurface
(
pDevice
,
16
,
16
,
D3DFMT_R5G6B5
,
D3DPOOL_SYSTEMMEM
,
&
surface
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_CreateOffscreenPlainSurface returned %08x
\n
"
,
hr
);
...
...
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