[Piglit] [PATCH 2/2] arb_shader_group_vote: Add simple vertex shader tests

Matt Turner mattst88 at gmail.com
Thu Jul 20 23:54:17 UTC 2017


---
 .../arb_shader_group_vote/vs-all-const.shader_test | 33 ++++++++++++++++++++
 .../vs-all-uniform.shader_test                     | 35 ++++++++++++++++++++++
 .../arb_shader_group_vote/vs-any-const.shader_test | 33 ++++++++++++++++++++
 .../vs-any-uniform.shader_test                     | 35 ++++++++++++++++++++++
 .../arb_shader_group_vote/vs-eq-const.shader_test  | 33 ++++++++++++++++++++
 .../vs-eq-uniform.shader_test                      | 35 ++++++++++++++++++++++
 6 files changed, 204 insertions(+)
 create mode 100644 tests/spec/arb_shader_group_vote/vs-all-const.shader_test
 create mode 100644 tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test
 create mode 100644 tests/spec/arb_shader_group_vote/vs-any-const.shader_test
 create mode 100644 tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test
 create mode 100644 tests/spec/arb_shader_group_vote/vs-eq-const.shader_test
 create mode 100644 tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test

diff --git a/tests/spec/arb_shader_group_vote/vs-all-const.shader_test b/tests/spec/arb_shader_group_vote/vs-all-const.shader_test
new file mode 100644
index 000000000..b7020144f
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-all-const.shader_test
@@ -0,0 +1,33 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (!allInvocationsARB(false))
+    color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+    color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test b/tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test
new file mode 100644
index 000000000..75ecd6f05
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-all-uniform.shader_test
@@ -0,0 +1,35 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+uniform bool val;
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (!allInvocationsARB(val))
+    color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+    color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+uniform int val 0
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_shader_group_vote/vs-any-const.shader_test b/tests/spec/arb_shader_group_vote/vs-any-const.shader_test
new file mode 100644
index 000000000..c173b3e15
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-any-const.shader_test
@@ -0,0 +1,33 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (anyInvocationARB(true))
+    color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+    color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test b/tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test
new file mode 100644
index 000000000..e52bcc998
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-any-uniform.shader_test
@@ -0,0 +1,35 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+uniform bool val;
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (anyInvocationARB(val))
+    color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+    color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+uniform int val 1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test b/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test
new file mode 100644
index 000000000..549b158a8
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test
@@ -0,0 +1,33 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (allInvocationsEqualARB(true) && allInvocationsEqualARB(false))
+    color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+    color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test b/tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test
new file mode 100644
index 000000000..f1b8d6de8
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test
@@ -0,0 +1,35 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+uniform bool val;
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (allInvocationsEqualARB(val) && allInvocationsEqualARB(!val))
+    color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+    color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+uniform int val 1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.13.0



More information about the Piglit mailing list