summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-09-25 22:33:23 -0700
committerMatt Turner <mattst88@gmail.com>2013-10-04 13:26:25 -0700
commit3ac0aad75c48b94052b812eaea2178c211d9748f (patch)
tree9b1710a4df7797a2fbe6b4f5a888049dd9343414
parent75add4e92a720d22264b34b96806aedaa43ea793 (diff)
arb_gpu_shader5: Test using only the lsb from imulExtended in the fs.
-rw-r--r--tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb.shader_test37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb.shader_test
new file mode 100644
index 000000000..b87d74e0b
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb.shader_test
@@ -0,0 +1,37 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform ivec4 x, y;
+uniform ivec4 expected_lsb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 msb, lsb;
+ imulExtended(x, y, msb, lsb);
+
+ if (lsb != expected_lsb)
+ frag_color.b = 1.0;
+}
+
+[test]
+uniform ivec4 x 1 1 1 1
+uniform ivec4 y 1 2 3 4
+uniform ivec4 expected_lsb 1 2 3 4
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform ivec4 x -1 2 -131072 -131073
+uniform ivec4 y 1 -2 131072 131073
+uniform ivec4 expected_lsb -1 -4 0 4294705151
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0