[PATCH 4/5] d3d9/tests: Add a test for vs_3_0 shaders using more than 256 constants.
Matteo Bruni
mbruni at codeweavers.com
Tue Sep 30 07:51:46 CDT 2014
---
dlls/d3d9/tests/device.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index f3771d9..d709da0 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -5128,6 +5128,24 @@ float4 main(const float4 color : COLOR) : SV_TARGET
0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
};
+#if 0
+ vs_3_0
+ dcl_position v0
+ dcl_position o0
+ def c256, 1.0, 1.0, 1.0, 1.0
+ add r0, v0, c256
+ mov o0, r0
+#endif
+ static const DWORD vs_3_high_index_constant[] =
+ {
+ 0xfffe0300,
+ 0x0200001f, 0x80000000, 0x900f0000,
+ 0x0200001f, 0x80000000, 0xe00f0000,
+ 0x05000051, 0xa00f0100, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000,
+ 0x03000002, 0x800f0000, 0x90e40000, 0xa0e40100,
+ 0x02000001, 0xe00f0000, 0x80e40000,
+ 0x0000ffff
+ };
IDirect3DVertexShader9 *vs = NULL;
IDirect3DPixelShader9 *ps = NULL;
@@ -5164,10 +5182,17 @@ float4 main(const float4 color : COLOR) : SV_TARGET
{
hr = IDirect3DDevice9_CreateVertexShader(device, vs_3_0, &vs);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+
+ skip("This GPU doesn't support SM3, skipping test with shader using unsupported constants.\n");
}
else
+ {
skip("This GPU supports SM3, skipping unsupported shader test.\n");
+ hr = IDirect3DDevice9_CreateVertexShader(device, vs_3_high_index_constant, &vs);
+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
+ }
+
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
IDirect3D9_Release(d3d);
--
1.8.5.5
More information about the wine-patches
mailing list