[Piglit] [PATCH] cs: use unsigned for gl_WorkGroupSize in compiler tests

Jordan Justen jordan.l.justen at intel.com
Sat Nov 22 11:56:47 PST 2014


As documented in:

https://www.opengl.org/registry/specs/ARB/compute_shader.txt

gl_WorkGroupSize's type is uvec3, not ivec3.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 .../arb_compute_shader/compiler/gl_WorkGroupSize_before_layout.comp | 2 +-
 .../compiler/gl_WorkGroupSize_matches_layout.comp                   | 6 +++---
 .../compiler/gl_WorkGroupSize_without_layout.comp                   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_before_layout.comp b/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_before_layout.comp
index 23324e3..2dc7c8f 100644
--- a/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_before_layout.comp
+++ b/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_before_layout.comp
@@ -16,7 +16,7 @@
 
 void main()
 {
-  ivec3 size = gl_WorkGroupSize;
+  uvec3 size = gl_WorkGroupSize;
 }
 
 layout(local_size_x = 3, local_size_y = 5, local_size_z = 7) in;
diff --git a/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_matches_layout.comp b/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_matches_layout.comp
index 094bcd9..e3289a5 100644
--- a/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_matches_layout.comp
+++ b/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_matches_layout.comp
@@ -23,7 +23,7 @@ layout(local_size_x = 3, local_size_y = 5, local_size_z = 7) in;
 
 void main()
 {
-  int x[gl_WorkGroupSize.x == 3 ? 1 : -1];
-  int y[gl_WorkGroupSize.y == 5 ? 1 : -1];
-  int z[gl_WorkGroupSize.z == 7 ? 1 : -1];
+  int x[gl_WorkGroupSize.x == 3u ? 1 : -1];
+  int y[gl_WorkGroupSize.y == 5u ? 1 : -1];
+  int z[gl_WorkGroupSize.z == 7u ? 1 : -1];
 }
diff --git a/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_without_layout.comp b/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_without_layout.comp
index cec8c45..ceeaa04 100644
--- a/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_without_layout.comp
+++ b/tests/spec/arb_compute_shader/compiler/gl_WorkGroupSize_without_layout.comp
@@ -14,5 +14,5 @@
 
 void main()
 {
-  ivec3 size = gl_WorkGroupSize;
+  uvec3 size = gl_WorkGroupSize;
 }
-- 
2.1.1



More information about the Piglit mailing list