summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-10-22 17:00:35 +0200
committerAxel Davy <[email protected]>2016-02-04 22:12:17 +0100
commitf481b9b952552da48af83e9fd041d73ba47b73f7 (patch)
tree93fe508ac50497f49ecc6c11eb37139d869bd7f6 /src/gallium/state_trackers/nine/device9.c
parentcbbd3c65cc6f9a9850b945bc3d56c1860836e26c (diff)
st/nine: Fix remaining swapchain tests
Return D3DERR_INVALIDCALL instead of E_POINTER. On error set ppBackBuffer to NULL. Multiple swapchains can only be created in windowed mode as windowed swapchain. Set backbuffer to NULL in NineDevice9_GetBackBuffer, but not in NineSwapChain9_GetBackBuffer. This fixes all WINE's device.c test_swapchain() tests. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 3752c63f444..68f2bcd69d2 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -710,6 +710,7 @@ NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
This, pPresentationParameters, pSwapChain);
user_assert(pPresentationParameters, D3DERR_INVALIDCALL);
+ user_assert(tmplt->params.Windowed && pPresentationParameters->Windowed, D3DERR_INVALIDCALL);
/* TODO: this deserves more tests */
if (!pPresentationParameters->hDeviceWindow)
@@ -811,6 +812,8 @@ NineDevice9_GetBackBuffer( struct NineDevice9 *This,
IDirect3DSurface9 **ppBackBuffer )
{
user_assert(ppBackBuffer != NULL, D3DERR_INVALIDCALL);
+ /* return NULL on error */
+ *ppBackBuffer = NULL;
user_assert(iSwapChain < This->nswapchains, D3DERR_INVALIDCALL);
return NineSwapChain9_GetBackBuffer(This->swapchains[iSwapChain],