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
2e8e2da5
Commit
2e8e2da5
authored
Sep 08, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Test D3DBACKBUFFER_TYPE.
parent
b55e599a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
device.c
dlls/d3d9/tests/device.c
+28
-1
No files found.
dlls/d3d9/tests/device.c
View file @
2e8e2da5
...
...
@@ -1053,7 +1053,7 @@ static void test_swapchain(void)
IDirect3DSwapChain9
*
swapchain2
;
IDirect3DSwapChain9
*
swapchain3
;
IDirect3DSwapChain9
*
swapchainX
;
IDirect3DSurface9
*
backbuffer
;
IDirect3DSurface9
*
backbuffer
,
*
stereo_buffer
;
D3DPRESENT_PARAMETERS
d3dpp
;
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d
;
...
...
@@ -1103,6 +1103,33 @@ static void test_swapchain(void)
ok
(
backbuffer
!=
NULL
,
"The back buffer is NULL
\n
"
);
if
(
backbuffer
)
IDirect3DSurface9_Release
(
backbuffer
);
/* The back buffer type value is ignored. */
hr
=
IDirect3DSwapChain9_GetBackBuffer
(
swapchain0
,
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
);
IDirect3DSurface9_Release
(
stereo_buffer
);
hr
=
IDirect3DSwapChain9_GetBackBuffer
(
swapchain0
,
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
);
IDirect3DSurface9_Release
(
stereo_buffer
);
hr
=
IDirect3DSwapChain9_GetBackBuffer
(
swapchain0
,
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
);
IDirect3DSurface9_Release
(
stereo_buffer
);
hr
=
IDirect3DDevice9_GetBackBuffer
(
device
,
0
,
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
);
IDirect3DSurface9_Release
(
stereo_buffer
);
hr
=
IDirect3DDevice9_GetBackBuffer
(
device
,
0
,
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
);
IDirect3DSurface9_Release
(
stereo_buffer
);
hr
=
IDirect3DDevice9_GetBackBuffer
(
device
,
0
,
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
);
IDirect3DSurface9_Release
(
stereo_buffer
);
/* Try to get a nonexistent swapchain */
hr
=
IDirect3DDevice9_GetSwapChain
(
device
,
1
,
&
swapchainX
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"GetSwapChain on an nonexistent swapchain 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