[Piglit] [PATCH V3 5/6] arb_arrays_of_arrays: add basic linking tests for atomic counters

Timothy Arceri t_arceri at yahoo.com.au
Sun Jul 5 00:18:15 PDT 2015


Test results:

Nvidia GeForce 840M - NVIDIA 346.47

vs-to-fs-atomic-counter-mismatch.shader_test - fail
vs-to-fs-atomic-counter.shader_test - pass
---
 .../vs-to-fs-atomic-counter-mismatch.shader_test   | 38 ++++++++++++++++++++++
 .../linker/vs-to-fs-atomic-counter.shader_test     | 38 ++++++++++++++++++++++
 2 files changed, 76 insertions(+)
 create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter-mismatch.shader_test
 create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test

diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter-mismatch.shader_test
new file mode 100644
index 0000000..6ac6522
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter-mismatch.shader_test
@@ -0,0 +1,38 @@
+# Test for linking error between vertex and fragment shaders
+# with mismatching AoA atomic counter declorations
+
+[require]
+GLSL >= 1.40
+GL_ARB_shader_atomic_counters
+GL_ARB_arrays_of_arrays
+
+[vertex shader]
+#version 140
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shader_atomic_counters: enable
+
+layout(binding = 0) uniform atomic_uint a1[3][2][2];
+
+in vec4 piglit_vertex;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shader_atomic_counters: enable
+
+layout(binding = 0) uniform atomic_uint a1[2][2][2];
+
+out vec4 fcolor;
+
+void main()
+{
+  fcolor = vec4(1.0);
+}
+
+[test]
+link error
diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test
new file mode 100644
index 0000000..2998e25
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test
@@ -0,0 +1,38 @@
+# Test for successful linking between vertex and fragment shaders
+# with matching AoA atomic counter declorations
+
+[require]
+GLSL >= 1.40
+GL_ARB_shader_atomic_counters
+GL_ARB_arrays_of_arrays
+
+[vertex shader]
+#version 140
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shader_atomic_counters: enable
+
+layout(binding = 0) uniform atomic_uint a1[3][2][2];
+
+in vec4 piglit_vertex;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shader_atomic_counters: enable
+
+layout(binding = 0) uniform atomic_uint a1[3][2][2];
+
+out vec4 fcolor;
+
+void main()
+{
+  fcolor = vec4(1.0);
+}
+
+[test]
+link success
-- 
2.4.3



More information about the Piglit mailing list