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
9d29be28
Commit
9d29be28
authored
Sep 07, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Test D3DBACKBUFFER_TYPE.
parent
2e8e2da5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
device.c
dlls/d3d8/tests/device.c
+33
-1
No files found.
dlls/d3d8/tests/device.c
View file @
9d29be28
...
...
@@ -257,7 +257,7 @@ static void test_swapchain(void)
IDirect3DSwapChain8
*
swapchain1
;
IDirect3DSwapChain8
*
swapchain2
;
IDirect3DSwapChain8
*
swapchain3
;
IDirect3DSurface8
*
backbuffer
;
IDirect3DSurface8
*
backbuffer
,
*
stereo_buffer
;
D3DPRESENT_PARAMETERS
d3dpp
;
IDirect3DDevice8
*
device
;
IDirect3D8
*
d3d
;
...
...
@@ -286,6 +286,24 @@ static void test_swapchain(void)
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
backbuffer
,
"The back buffer pointer is %p, expected NULL.
\n
"
,
backbuffer
);
hr
=
IDirect3DDevice8_GetBackBuffer
(
device
,
0
,
D3DBACKBUFFER_TYPE_MONO
,
&
backbuffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get back buffer, hr %#x.
\n
"
,
hr
);
IDirect3DSurface8_Release
(
backbuffer
);
/* The back buffer type value is ignored. */
hr
=
IDirect3DDevice8_GetBackBuffer
(
device
,
0
,
D3DBACKBUFFER_TYPE_LEFT
,
&
stereo_buffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the back buffer, hr %#x.
\n
"
,
hr
);
ok
(
stereo_buffer
==
backbuffer
,
"Expected left back buffer = %p, got %p.
\n
"
,
backbuffer
,
stereo_buffer
);
IDirect3DSurface8_Release
(
stereo_buffer
);
hr
=
IDirect3DDevice8_GetBackBuffer
(
device
,
0
,
D3DBACKBUFFER_TYPE_RIGHT
,
&
stereo_buffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the back buffer, hr %#x.
\n
"
,
hr
);
ok
(
stereo_buffer
==
backbuffer
,
"Expected right back buffer = %p, got %p.
\n
"
,
backbuffer
,
stereo_buffer
);
IDirect3DSurface8_Release
(
stereo_buffer
);
hr
=
IDirect3DDevice8_GetBackBuffer
(
device
,
0
,
(
D3DBACKBUFFER_TYPE
)
0xdeadbeef
,
&
stereo_buffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the back buffer, hr %#x.
\n
"
,
hr
);
ok
(
stereo_buffer
==
backbuffer
,
"Expected unknown buffer = %p, got %p.
\n
"
,
backbuffer
,
stereo_buffer
);
IDirect3DSurface8_Release
(
stereo_buffer
);
memset
(
&
d3dpp
,
0
,
sizeof
(
d3dpp
));
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
...
...
@@ -315,6 +333,20 @@ static void test_swapchain(void)
ok
(
backbuffer
!=
NULL
&&
backbuffer
!=
(
void
*
)
0xdeadbeef
,
"The back buffer is %p
\n
"
,
backbuffer
);
if
(
backbuffer
&&
backbuffer
!=
(
void
*
)
0xdeadbeef
)
IDirect3DSurface8_Release
(
backbuffer
);
/* The back buffer type value is ignored. */
hr
=
IDirect3DSwapChain8_GetBackBuffer
(
swapchain3
,
0
,
D3DBACKBUFFER_TYPE_LEFT
,
&
stereo_buffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the back buffer, hr %#x.
\n
"
,
hr
);
ok
(
stereo_buffer
==
backbuffer
,
"Expected left back buffer = %p, got %p.
\n
"
,
backbuffer
,
stereo_buffer
);
IDirect3DSurface8_Release
(
stereo_buffer
);
hr
=
IDirect3DSwapChain8_GetBackBuffer
(
swapchain3
,
0
,
D3DBACKBUFFER_TYPE_RIGHT
,
&
stereo_buffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the back buffer, hr %#x.
\n
"
,
hr
);
ok
(
stereo_buffer
==
backbuffer
,
"Expected right back buffer = %p, got %p.
\n
"
,
backbuffer
,
stereo_buffer
);
IDirect3DSurface8_Release
(
stereo_buffer
);
hr
=
IDirect3DSwapChain8_GetBackBuffer
(
swapchain3
,
0
,
(
D3DBACKBUFFER_TYPE
)
0xdeadbeef
,
&
stereo_buffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the back buffer, hr %#x.
\n
"
,
hr
);
ok
(
stereo_buffer
==
backbuffer
,
"Expected unknown buffer = %p, got %p.
\n
"
,
backbuffer
,
stereo_buffer
);
IDirect3DSurface8_Release
(
stereo_buffer
);
backbuffer
=
(
void
*
)
0xdeadbeef
;
hr
=
IDirect3DSwapChain8_GetBackBuffer
(
swapchain3
,
1
,
0
,
&
backbuffer
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the 2nd back buffer (%#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