=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3dx9/tests: Add a test for D3DXLoadSurfaceFromSurface.
Alexandre Julliard
julliard at winehq.org
Mon May 21 15:31:07 CDT 2012
Module: wine
Branch: master
Commit: 0da94d4985376611bff47508cb9c05d134be233a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0da94d4985376611bff47508cb9c05d134be233a
Author: Józef Kucia <joseph.kucia at gmail.com>
Date: Fri May 18 15:50:14 2012 +0200
d3dx9/tests: Add a test for D3DXLoadSurfaceFromSurface.
---
dlls/d3dx9_36/tests/surface.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index cb49ca3..8fefd0c 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -437,6 +437,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
{
HRESULT hr;
BOOL testdummy_ok, testbitmap_ok;
+ IDirect3DTexture9 *tex;
IDirect3DSurface9 *surf, *newsurf;
RECT rect, destrect;
D3DLOCKED_RECT lockrect;
@@ -586,6 +587,18 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
check_release((IUnknown*)newsurf, 0);
} else skip("Failed to create a second surface\n");
+ hr = IDirect3DDevice9_CreateTexture(device, 256, 256, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &tex, NULL);
+ if (SUCCEEDED(hr))
+ {
+ IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
+
+ hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_DEFAULT, 0);
+ ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3D_OK);
+
+ IDirect3DSurface9_Release(newsurf);
+ IDirect3DTexture9_Release(tex);
+ } else skip("Failed to create texture\n");
+
check_release((IUnknown*)surf, 0);
More information about the wine-cvs
mailing list