[Piglit] [PATCH 5/7] arb_gpu_shader5: gl_InvocationID should be 0 w/o invocations qualifier

Jordan Justen jordan.l.justen at intel.com
Thu Jan 23 23:55:10 PST 2014


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 .../invocation-id-without-qualifier.shader_test    | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 tests/spec/arb_gpu_shader5/execution/invocation-id-without-qualifier.shader_test

diff --git a/tests/spec/arb_gpu_shader5/execution/invocation-id-without-qualifier.shader_test b/tests/spec/arb_gpu_shader5/execution/invocation-id-without-qualifier.shader_test
new file mode 100644
index 0000000..a1c0043
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/invocation-id-without-qualifier.shader_test
@@ -0,0 +1,55 @@
+#
+# Without an invocations qualifier, a default of 1
+# invocation should be used, and gl_InvocationID should
+# return 0.
+#
+
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#version 150
+
+void main()
+{
+}
+
+[geometry shader]
+#version 150
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(points) in;
+layout(triangle_strip, max_vertices = 4) out;
+
+void emit(vec2 v)
+{
+  gl_Position.xy = v;
+  gl_Position.zw = vec2(0, 1);
+  EmitVertex();
+}
+
+void main()
+{
+  if (gl_InvocationID == 0) {
+    emit(vec2(-1, -1));
+    emit(vec2( 1, -1));
+    emit(vec2(-1,  1));
+    emit(vec2( 1,  1));
+    EndPrimitive();
+  }
+}
+
+[fragment shader]
+#version 150
+
+void main()
+{
+  gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+draw arrays GL_POINTS 0 1
+probe all rgba 0.0 1.0 0.0 1.0
-- 
1.8.5.3



More information about the Piglit mailing list