[Piglit] [PATCH 2/7] arb_gpu_shader5/invocation-id-basic: range check gl_InvocationID

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


Make sure that gl_InvocationID is 0 .. 3.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 .../execution/invocation-id-basic.shader_test                | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/spec/arb_gpu_shader5/execution/invocation-id-basic.shader_test b/tests/spec/arb_gpu_shader5/execution/invocation-id-basic.shader_test
index 1169cfb..d94cee8 100644
--- a/tests/spec/arb_gpu_shader5/execution/invocation-id-basic.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/invocation-id-basic.shader_test
@@ -31,11 +31,13 @@ void main()
   v.x = -1.0 + float(i & 1);
   v.y = -1.0 + float((i & 2) / 2);
 
-  emit(v);
-  emit(v + vec2(1, 0));
-  emit(v + vec2(0, 1));
-  emit(v + vec2(1, 1));
-  EndPrimitive();
+  if (i >= 0 && i < 4) {
+    emit(v);
+    emit(v + vec2(1, 0));
+    emit(v + vec2(0, 1));
+    emit(v + vec2(1, 1));
+    EndPrimitive();
+  }
 }
 
 [fragment shader]
-- 
1.8.5.3



More information about the Piglit mailing list