[Piglit] [PATCH] Add imulExtended/umulExtended tests with non-uniform parameters.
Kenneth Graunke
kenneth at whitecape.org
Wed Nov 12 10:15:39 PST 2014
These are identical to the existing tests, except that we add a uniform
containing zero to the parameters, so they're forced to be ordinary
temporaries.
This exposes a regioning bug in i965's Gen8+ imulExtended handling,
which only worked on uniform values.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
.../fs-imulExtended-nonuniform.shader_test | 45 ++++++++++++++++++
...fs-imulExtended-only-lsb-nonuniform.shader_test | 41 ++++++++++++++++
...fs-imulExtended-only-msb-nonuniform.shader_test | 41 ++++++++++++++++
.../fs-umulExtended-nonuniform.shader_test | 45 ++++++++++++++++++
...fs-umulExtended-only-lsb-nonuniform.shader_test | 41 ++++++++++++++++
...fs-umulExtended-only-msb-nonuniform.shader_test | 41 ++++++++++++++++
.../vs-imulExtended-nonuniform.shader_test | 55 ++++++++++++++++++++++
...vs-imulExtended-only-lsb-nonuniform.shader_test | 51 ++++++++++++++++++++
...vs-imulExtended-only-msb-nonuniform.shader_test | 51 ++++++++++++++++++++
.../vs-umulExtended-nonuniform.shader_test | 55 ++++++++++++++++++++++
...vs-umulExtended-only-lsb-nonuniform.shader_test | 51 ++++++++++++++++++++
...vs-umulExtended-only-msb-nonuniform.shader_test | 51 ++++++++++++++++++++
12 files changed, 568 insertions(+)
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-msb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-lsb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-msb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-lsb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-msb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-lsb-nonuniform.shader_test
create mode 100644 tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-msb-nonuniform.shader_test
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-nonuniform.shader_test
new file mode 100644
index 0000000..da4ab84
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-nonuniform.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform int zero;
+uniform ivec4 x, y;
+uniform ivec4 expected_msb, expected_lsb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 xx = x + zero;
+ ivec4 yy = y + zero;
+ ivec4 msb, lsb;
+ imulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ frag_color.r = 1.0;
+ if (lsb != expected_lsb)
+ frag_color.b = 1.0;
+}
+
+[test]
+uniform int zero 0
+uniform ivec4 x 1 1 1 1
+uniform ivec4 y 1 2 3 4
+uniform ivec4 expected_msb 0 0 0 0
+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_msb -1 -1 4294967292 4294967291
+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
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb-nonuniform.shader_test
new file mode 100644
index 0000000..c5acf99
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-lsb-nonuniform.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform int zero;
+uniform ivec4 x, y;
+uniform ivec4 expected_lsb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 xx = x + zero;
+ ivec4 yy = y + zero;
+ ivec4 msb, lsb;
+ imulExtended(xx, yy, msb, lsb);
+
+ if (lsb != expected_lsb)
+ frag_color.b = 1.0;
+}
+
+[test]
+uniform int zero 0
+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
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-msb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-msb-nonuniform.shader_test
new file mode 100644
index 0000000..5f6cea1
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-imulExtended-only-msb-nonuniform.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform int zero;
+uniform ivec4 x, y;
+uniform ivec4 expected_msb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 xx = x + zero;
+ ivec4 yy = y + zero;
+ ivec4 msb, lsb;
+ imulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ frag_color.r = 1.0;
+}
+
+[test]
+uniform int zero 0
+uniform ivec4 x 1 1 1 1
+uniform ivec4 y 1 2 3 4
+uniform ivec4 expected_msb 0 0 0 0
+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_msb -1 -1 4294967292 4294967291
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-nonuniform.shader_test
new file mode 100644
index 0000000..0005609
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-nonuniform.shader_test
@@ -0,0 +1,45 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform uint zero;
+uniform uvec4 x, y;
+uniform uvec4 expected_msb, expected_lsb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ uvec4 xx = x + zero;
+ uvec4 yy = y + zero;
+ uvec4 msb, lsb;
+ umulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ frag_color.r = 1.0;
+ if (lsb != expected_lsb)
+ frag_color.b = 1.0;
+}
+
+[test]
+uniform uint zero 0
+uniform uvec4 x 1 1 1 1
+uniform uvec4 y 1 2 3 4
+uniform uvec4 expected_msb 0 0 0 0
+uniform uvec4 expected_lsb 1 2 3 4
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uvec4 x 0x10000000 0x10000000 0xFFFFFFFF 0xFFFFFFFF
+uniform uvec4 y 0x10 0x11 0x2 0xFFFFFFFF
+uniform uvec4 expected_msb 0x1 0x1 0x1 0xFFFFFFFE
+uniform uvec4 expected_lsb 0 0x10000000 0xFFFFFFFE 0x1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-lsb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-lsb-nonuniform.shader_test
new file mode 100644
index 0000000..f49ecf1
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-lsb-nonuniform.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform uint zero;
+uniform uvec4 x, y;
+uniform uvec4 expected_lsb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ uvec4 xx = x + zero;
+ uvec4 yy = y + zero;
+ uvec4 msb, lsb;
+ umulExtended(xx, yy, msb, lsb);
+
+ if (lsb != expected_lsb)
+ frag_color.b = 1.0;
+}
+
+[test]
+uniform uint zero 0
+uniform uvec4 x 1 1 1 1
+uniform uvec4 y 1 2 3 4
+uniform uvec4 expected_lsb 1 2 3 4
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uvec4 x 0x10000000 0x10000000 0xFFFFFFFF 0xFFFFFFFF
+uniform uvec4 y 0x10 0x11 0x2 0xFFFFFFFF
+uniform uvec4 expected_lsb 0 0x10000000 0xFFFFFFFE 0x1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-msb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-msb-nonuniform.shader_test
new file mode 100644
index 0000000..6055196
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-umulExtended-only-msb-nonuniform.shader_test
@@ -0,0 +1,41 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 frag_color;
+
+uniform uint zero;
+uniform uvec4 x, y;
+uniform uvec4 expected_msb;
+
+void main()
+{
+ frag_color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ uvec4 xx = x + zero;
+ uvec4 yy = y + zero;
+ uvec4 msb, lsb;
+ umulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ frag_color.r = 1.0;
+}
+
+[test]
+uniform uint zero 0
+uniform uvec4 x 1 1 1 1
+uniform uvec4 y 1 2 3 4
+uniform uvec4 expected_msb 0 0 0 0
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uvec4 x 0x10000000 0x10000000 0xFFFFFFFF 0xFFFFFFFF
+uniform uvec4 y 0x10 0x11 0x2 0xFFFFFFFF
+uniform uvec4 expected_msb 0x1 0x1 0x1 0xFFFFFFFE
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-nonuniform.shader_test
new file mode 100644
index 0000000..e66f316
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-nonuniform.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+uniform int zero;
+uniform ivec4 x, y;
+uniform ivec4 expected_msb, expected_lsb;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 xx = x + zero;
+ ivec4 yy = y + zero;
+ ivec4 msb, lsb;
+ imulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ color.r = 1.0;
+ if (lsb != expected_lsb)
+ color.b = 1.0;
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+ frag_color = color;
+}
+
+[test]
+uniform int zero 0
+uniform ivec4 x 1 1 1 1
+uniform ivec4 y 1 2 3 4
+uniform ivec4 expected_msb 0 0 0 0
+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_msb -1 -1 4294967292 4294967291
+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
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-lsb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-lsb-nonuniform.shader_test
new file mode 100644
index 0000000..d438239
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-lsb-nonuniform.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+uniform int zero;
+uniform ivec4 x, y;
+uniform ivec4 expected_lsb;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 xx = x + zero;
+ ivec4 yy = y + zero;
+ ivec4 msb, lsb;
+ imulExtended(xx, yy, msb, lsb);
+
+ if (lsb != expected_lsb)
+ color.b = 1.0;
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+ frag_color = color;
+}
+
+[test]
+uniform int zero 0
+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
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-msb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-msb-nonuniform.shader_test
new file mode 100644
index 0000000..fe18ca7
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-imulExtended-only-msb-nonuniform.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+uniform int zero;
+uniform ivec4 x, y;
+uniform ivec4 expected_msb;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ ivec4 xx = x + zero;
+ ivec4 yy = y + zero;
+ ivec4 msb, lsb;
+ imulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ color.r = 1.0;
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+ frag_color = color;
+}
+
+[test]
+uniform int zero 0
+uniform ivec4 x 1 1 1 1
+uniform ivec4 y 1 2 3 4
+uniform ivec4 expected_msb 0 0 0 0
+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_msb -1 -1 4294967292 4294967291
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-nonuniform.shader_test
new file mode 100644
index 0000000..b6764ee
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-nonuniform.shader_test
@@ -0,0 +1,55 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+uniform uint zero;
+uniform uvec4 x, y;
+uniform uvec4 expected_msb, expected_lsb;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ uvec4 xx = x + zero;
+ uvec4 yy = y + zero;
+ uvec4 msb, lsb;
+ umulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ color.r = 1.0;
+ if (lsb != expected_lsb)
+ color.b = 1.0;
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+ frag_color = color;
+}
+
+[test]
+uniform uint zero 0
+uniform uvec4 x 1 1 1 1
+uniform uvec4 y 1 2 3 4
+uniform uvec4 expected_msb 0 0 0 0
+uniform uvec4 expected_lsb 1 2 3 4
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uvec4 x 0x10000000 0x10000000 0xFFFFFFFF 0xFFFFFFFF
+uniform uvec4 y 0x10 0x11 0x2 0xFFFFFFFF
+uniform uvec4 expected_msb 0x1 0x1 0x1 0xFFFFFFFE
+uniform uvec4 expected_lsb 0 0x10000000 0xFFFFFFFE 0x1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-lsb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-lsb-nonuniform.shader_test
new file mode 100644
index 0000000..4933064
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-lsb-nonuniform.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+uniform uint zero;
+uniform uvec4 x, y;
+uniform uvec4 expected_lsb;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ uvec4 xx = x + zero;
+ uvec4 yy = y + zero;
+ uvec4 msb, lsb;
+ umulExtended(xx, yy, msb, lsb);
+
+ if (lsb != expected_lsb)
+ color.b = 1.0;
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+ frag_color = color;
+}
+
+[test]
+uniform uint zero 0
+uniform uvec4 x 1 1 1 1
+uniform uvec4 y 1 2 3 4
+uniform uvec4 expected_lsb 1 2 3 4
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uvec4 x 0x10000000 0x10000000 0xFFFFFFFF 0xFFFFFFFF
+uniform uvec4 y 0x10 0x11 0x2 0xFFFFFFFF
+uniform uvec4 expected_lsb 0 0x10000000 0xFFFFFFFE 0x1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-msb-nonuniform.shader_test b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-msb-nonuniform.shader_test
new file mode 100644
index 0000000..065eab1
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/built-in-functions/vs-umulExtended-only-msb-nonuniform.shader_test
@@ -0,0 +1,51 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+uniform uint zero;
+uniform uvec4 x, y;
+uniform uvec4 expected_msb;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+
+ uvec4 xx = x + zero;
+ uvec4 yy = y + zero;
+ uvec4 msb, lsb;
+ umulExtended(xx, yy, msb, lsb);
+
+ if (msb != expected_msb)
+ color.r = 1.0;
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+ frag_color = color;
+}
+
+[test]
+uniform uint zero 0
+uniform uvec4 x 1 1 1 1
+uniform uvec4 y 1 2 3 4
+uniform uvec4 expected_msb 0 0 0 0
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uvec4 x 0x10000000 0x10000000 0xFFFFFFFF 0xFFFFFFFF
+uniform uvec4 y 0x10 0x11 0x2 0xFFFFFFFF
+uniform uvec4 expected_msb 0x1 0x1 0x1 0xFFFFFFFE
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
--
2.1.3
More information about the Piglit
mailing list