From 9ba3d03e7848ec7881ffc3cfdcf01a76d1aa1cc5 Mon Sep 17 00:00:00 2001 From: Tobias Jakobi Date: Tue, 8 Jul 2008 12:56:16 +0200 Subject: [PATCH] d3d8: Fix IDirect3DDevice8::CreateImageSurface pool type. --- dlls/d3d8/device.c | 4 +++- dlls/d3d8/tests/surface.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index cf864ccd8fc..476abe90b42 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -697,12 +697,14 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateDepthStencilSurface(LPDIRECT3DD return hr; } +/* IDirect3DDevice8Impl::CreateImageSurface returns surface with pool type SYSTEMMEM */ static HRESULT WINAPI IDirect3DDevice8Impl_CreateImageSurface(LPDIRECT3DDEVICE8 iface, UINT Width, UINT Height, D3DFORMAT Format, IDirect3DSurface8** ppSurface) { HRESULT hr; TRACE("Relay\n"); EnterCriticalSection(&d3d8_cs); - hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Loackable */ , FALSE /*Discard*/ , 0 /* Level */ , ppSurface, D3DRTYPE_SURFACE, 0 /* Usage (undefined/none) */ , D3DPOOL_SCRATCH, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); + hr = IDirect3DDevice8Impl_CreateSurface(iface, Width, Height, Format, TRUE /* Loackable */ , FALSE /*Discard*/ , 0 /* Level */ , ppSurface, + D3DRTYPE_SURFACE, 0 /* Usage (undefined/none) */ , D3DPOOL_SYSTEMMEM, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); LeaveCriticalSection(&d3d8_cs); return hr; } diff --git a/dlls/d3d8/tests/surface.c b/dlls/d3d8/tests/surface.c index 3580e59584e..86fb8843050 100644 --- a/dlls/d3d8/tests/surface.c +++ b/dlls/d3d8/tests/surface.c @@ -96,7 +96,7 @@ static void test_image_surface_pool(IDirect3DDevice8 *device) { hr = IDirect3DSurface8_GetDesc(surface, &surf_desc); ok(SUCCEEDED(hr), "GetDesc failed (0x%08x)\n", hr); - todo_wine ok((surf_desc.Pool == D3DPOOL_SYSTEMMEM), + ok((surf_desc.Pool == D3DPOOL_SYSTEMMEM), "CreateImageSurface returns surface with unexpected pool type %u (should be SYSTEMMEM = 2)\n", surf_desc.Pool); IDirect3DSurface8_Release(surface); -- 2.11.4.GIT