summaryrefslogtreecommitdiff
path: root/tests/spec/arb_compute_shader
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2016-02-25 12:39:14 -0800
committerJordan Justen <jordan.l.justen@intel.com>2016-02-26 09:47:06 -0800
commit904834b02a126d4f74dac7c530019f0653a9dc2b (patch)
tree1229f2fca4d4e9587c6dc290673589cf6a64ac1d /tests/spec/arb_compute_shader
parent0393d5eac42e70982c0cf41b787224cdfb13c916 (diff)
arb_compute_shader: Add test for Mesa bug 93840
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93840 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'tests/spec/arb_compute_shader')
-rw-r--r--tests/spec/arb_compute_shader/linker/bug-93840.shader_test39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/spec/arb_compute_shader/linker/bug-93840.shader_test b/tests/spec/arb_compute_shader/linker/bug-93840.shader_test
new file mode 100644
index 000000000..1d4eb28c1
--- /dev/null
+++ b/tests/spec/arb_compute_shader/linker/bug-93840.shader_test
@@ -0,0 +1,39 @@
+# Tests linking a shader with a large workgroup and local data set.
+#
+# This is related to:
+# Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93840
+#
+# There are two important elements to this test:
+#
+# 1. local workgroup size of 1024 based on the spec requirements.
+#
+# 2. Use a 'large' size of live local data. In the test this is
+# controlled with the SIZE macro. This is hardware specific, and
+# the value of 64 was chosen because it was observed to fail on the
+# Mesa i965 driver.
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_compute_shader
+
+[compute shader]
+#version 330
+#extension GL_ARB_compute_shader: enable
+
+layout(local_size_x = 1024) in;
+
+#define SIZE 64
+
+shared int sa[SIZE];
+
+void main()
+{
+ int a[SIZE] = sa;
+ a[int(gl_LocalInvocationIndex) % SIZE] += 1;
+ if (a[int(gl_LocalInvocationIndex) % SIZE] == 0)
+ sa[0] = 1;
+}
+
+[test]
+link success