[PATCH 3/3] d3d9/tests: Skip unbound_sampler_test if cube or volume textures aren't supported.
Matteo Bruni
mbruni at codeweavers.com
Wed Jun 19 14:59:26 CDT 2013
---
dlls/d3d9/tests/visual.c | 9 +++++++++
1 file changed, 9 insertions(+)
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);
--
1.8.1.5
More information about the wine-patches
mailing list