Matteo Bruni : d3d9/tests: Skip unbound_sampler_test if cube or volume textures aren't supported.

Alexandre Julliard julliard at winehq.org
Thu Jun 20 15:31:16 CDT 2013


Module: wine
Branch: master
Commit: aeade16d62d94b941a8d7e48b5fb6f3897fcb84d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aeade16d62d94b941a8d7e48b5fb6f3897fcb84d

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Jun 19 21:59:26 2013 +0200

d3d9/tests: Skip unbound_sampler_test if cube or volume textures aren't supported.

---

 dlls/d3d9/tests/visual.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 73f5066..ee15651 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -12763,6 +12763,7 @@ static void unbound_sampler_test(IDirect3DDevice9 *device)
     IDirect3DPixelShader9 *ps, *ps_cube, *ps_volume;
     IDirect3DSurface9 *rt, *old_rt;
     DWORD color;
+    D3DCAPS9 caps;
 
     static const DWORD ps_code[] =
     {
@@ -12805,6 +12806,14 @@ static void unbound_sampler_test(IDirect3DDevice9 *device)
         { 1.0f,   1.0f,  0.1f,   1.0f,   1.0f}
     };
 
+    hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
+    ok(SUCCEEDED(hr), "GetDeviceCaps failed, hr %#x.\n", hr);
+    if (!(caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP) || !(caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP))
+    {
+        skip("No cube / volume textures support, skipping the unbound sampler test.\n");
+        return;
+    }
+
     hr = IDirect3DDevice9_SetTexture(device, 0, NULL);
     ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStage failed, %#x.\n", hr);
 




More information about the wine-cvs mailing list