Matteo Bruni : d3dx9/tests: Expect plain render target creation to work.

Alexandre Julliard julliard at winehq.org
Thu Jan 24 14:42:52 CST 2019


Module: wine
Branch: master
Commit: 64b6bb4d4a54642434594f0df2afcd2e90b2a0a8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=64b6bb4d4a54642434594f0df2afcd2e90b2a0a8

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Thu Jan 24 01:10:56 2019 +0100

d3dx9/tests: Expect plain render target creation to work.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dx9_36/tests/surface.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 6cb1ddb..b7c52a2 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -847,21 +847,24 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
 
     /* non-lockable render target */
     hr = IDirect3DDevice9_CreateRenderTarget(device, 256, 256, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &newsurf, NULL);
-    if (SUCCEEDED(hr)) {
-        hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0);
-        ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3D_OK);
-
-        IDirect3DSurface9_Release(newsurf);
-    } else skip("Failed to create render target surface\n");
+    ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
+    hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0);
+    ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
+    IDirect3DSurface9_Release(newsurf);
 
     /* non-lockable multisampled render target */
     hr = IDirect3DDevice9_CreateRenderTarget(device, 256, 256, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, 0, FALSE, &newsurf, NULL);
-    if (SUCCEEDED(hr)) {
+    if (SUCCEEDED(hr))
+    {
        hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0);
-       ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x\n", hr, D3D_OK);
+       ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
 
        IDirect3DSurface9_Release(newsurf);
-    } else skip("Failed to create multisampled render target.\n");
+    }
+    else
+    {
+        skip("Failed to create multisampled render target.\n");
+    }
 
     hr = IDirect3DDevice9_GetRenderTarget(device, 0, &newsurf);
     ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderTarget returned %#x, expected %#x.\n", hr, D3D_OK);




More information about the wine-cvs mailing list