diff mbox

[3/4] arb_arrays_of_arrays: add basic linking tests for atomic counters

Message ID 1433729882-5502-3-git-send-email-t_arceri@yahoo.com.au
State New
Headers show

Commit Message

'Timothy Arceri' via Patchwork Forward June 8, 2015, 2:18 a.m. UTC
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 mbox

Patch

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