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
a6424b94
Commit
a6424b94
authored
Mar 10, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Test depth stencil size mismatches.
parent
ee2ac1ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
device.c
dlls/d3d8/tests/device.c
+39
-0
No files found.
dlls/d3d8/tests/device.c
View file @
a6424b94
...
...
@@ -2117,6 +2117,44 @@ cleanup:
DestroyWindow
(
hwnd
);
}
static
void
test_depth_stencil_size
(
void
)
{
IDirect3DDevice8
*
device
;
IDirect3DSurface8
*
ds
,
*
rt
,
*
ds_bigger
;
IDirect3D8
*
d3d8
;
HRESULT
hr
;
HWND
hwnd
;
d3d8
=
pDirect3DCreate8
(
D3D_SDK_VERSION
);
ok
(
d3d8
!=
NULL
,
"Failed to create IDirect3D8 object
\n
"
);
hwnd
=
CreateWindow
(
"d3d8_test_wc"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
160
,
160
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"Failed to create window
\n
"
);
if
(
!
d3d8
||
!
hwnd
)
goto
cleanup
;
device
=
create_device
(
d3d8
,
hwnd
,
hwnd
,
TRUE
);
if
(
!
device
)
goto
cleanup
;
hr
=
IDirect3DDevice8_CreateRenderTarget
(
device
,
64
,
64
,
D3DFMT_A8R8G8B8
,
D3DMULTISAMPLE_NONE
,
FALSE
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice8_CreateRenderTarget failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_CreateDepthStencilSurface
(
device
,
32
,
32
,
D3DFMT_D24X8
,
D3DMULTISAMPLE_NONE
,
&
ds
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice8_CreateDepthStencilSurface failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_CreateDepthStencilSurface
(
device
,
128
,
128
,
D3DFMT_D24X8
,
D3DMULTISAMPLE_NONE
,
&
ds_bigger
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice8_CreateDepthStencilSurface failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_SetRenderTarget
(
device
,
rt
,
ds
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DDevice8_SetRenderTarget returned %#x, expected D3DERR_INVALIDCALL.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_SetRenderTarget
(
device
,
rt
,
ds_bigger
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice8_CreateDepthStencilSurface failed, hr %#x.
\n
"
,
hr
);
IDirect3DSurface8_Release
(
rt
);
IDirect3DSurface8_Release
(
ds
);
IDirect3DSurface8_Release
(
ds_bigger
);
cleanup:
if
(
d3d8
)
IDirect3D8_Release
(
d3d8
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
device
)
{
HMODULE
d3d8_handle
=
LoadLibraryA
(
"d3d8.dll"
);
...
...
@@ -2164,6 +2202,7 @@ START_TEST(device)
test_depth_stencil_reset
();
test_wndproc
();
test_wndproc_windowed
();
test_depth_stencil_size
();
}
UnregisterClassA
(
"d3d8_test_wc"
,
GetModuleHandleA
(
NULL
));
}
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