[Piglit] [PATCH 08/12] Test ARB_compute_shader built-in constant gl_MaxComputeWorkGroupSize.

Paul Berry stereotype441 at gmail.com
Thu Jan 9 10:59:59 PST 2014


---
 .../compiler/gl_MaxComputeWorkGroupSize.comp         | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 tests/spec/arb_compute_shader/compiler/gl_MaxComputeWorkGroupSize.comp

diff --git a/tests/spec/arb_compute_shader/compiler/gl_MaxComputeWorkGroupSize.comp b/tests/spec/arb_compute_shader/compiler/gl_MaxComputeWorkGroupSize.comp
new file mode 100644
index 0000000..8291dd8
--- /dev/null
+++ b/tests/spec/arb_compute_shader/compiler/gl_MaxComputeWorkGroupSize.comp
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_compute_shader
+// [end config]
+//
+// Test the minimum values for gl_MaxComputeWorkGroupSize specified in
+// ARB_compute_shader.
+
+#version 330
+#extension GL_ARB_compute_shader: enable
+
+layout(local_size_x = 1) in;
+
+void main()
+{
+  int x[gl_MaxComputeWorkGroupSize.x >= 1024 ? 1 : -1];
+  int y[gl_MaxComputeWorkGroupSize.y >= 1024 ? 1 : -1];
+  int z[gl_MaxComputeWorkGroupSize.z >= 64 ? 1 : -1];
+}
-- 
1.8.5.2



More information about the Piglit mailing list