[d3d8] Fix IDirect3DDevice8::CreateImageSurface pool type and activate testcase

Tobias Jakobi liquid.acid at gmx.net
Wed Jul 2 18:30:08 CDT 2008


---
 dlls/d3d8/device.c        |    4 +++-
 dlls/d3d8/tests/surface.c |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index cf864cc..338bd32 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 (verified by testcase in tests/surface.c) */
 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 29be0a2..fb5d3a9 100644
--- a/dlls/d3d8/tests/surface.c
+++ b/dlls/d3d8/tests/surface.c
@@ -336,6 +336,7 @@ START_TEST(surface)
     device_ptr = init_d3d8(d3d8_handle);
     if (!device_ptr) return;
 
+    test_image_surface_pool(device_ptr);
     test_surface_get_container(device_ptr);
     test_lockrect_invalid(device_ptr);
     test_private_data(device_ptr);
-- 
1.5.4.5


--------------050508000906050006030200--



More information about the wine-patches mailing list