[Piglit] [PATCH V2] glsl-1.20: test implicitly sized arrays match explicitly sized arrays across the same stage

Timothy Arceri t_arceri at yahoo.com.au
Thu Dec 4 13:18:21 PST 2014


V2: Add Catalyst test results

Test results:

AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3

intrastage-unsized-array-mismatch.shader_test
AMD: pass

intrastage-unsized-array-mismatch2.shader_test
AMD: pass

intrastage-unsized-array.shader_test
AMD: fail

intrastage-unsized-array2.shader_test
AMD: pass

Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
 .../intrastage-unsized-array-mismatch.shader_test  | 33 ++++++++++++++++++++++
 .../intrastage-unsized-array-mismatch2.shader_test | 33 ++++++++++++++++++++++
 .../linker/intrastage-unsized-array.shader_test    | 33 ++++++++++++++++++++++
 .../linker/intrastage-unsized-array2.shader_test   | 33 ++++++++++++++++++++++
 4 files changed, 132 insertions(+)
 create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test
 create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test
 create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test
 create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test

diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test
new file mode 100644
index 0000000..cdf3a91
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test
@@ -0,0 +1,33 @@
+# This test verifies that a link error is generated if implicitly sized
+# arrays dont match explicitly sized arrays across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[3];
+
+void f()
+{
+  color[1] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f();
+
+void main()
+{
+  f();
+  color[3] = vec4(1, 0, 0, 1);
+
+  gl_Position = gl_Vertex;
+}
+
+[test]
+link error
diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test
new file mode 100644
index 0000000..764469a
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test
@@ -0,0 +1,33 @@
+# This test verifies that a link error is generated if implicitly sized
+# arrays dont match explicitly sized arrays across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f()
+{
+  color[3] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[3];
+
+void f();
+
+void main()
+{
+  f();
+  color[2] = vec4(1, 0, 0, 1);
+
+  gl_Position = gl_Vertex;
+}
+
+[test]
+link error
diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test
new file mode 100644
index 0000000..6fdd806
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test
@@ -0,0 +1,33 @@
+# Test implicitly sized arrays match explicitly sized arrays
+# across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[4];
+
+void f()
+{
+  color[1] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f();
+
+void main()
+{
+  f();
+  color[3] = vec4(1, 0, 0, 1);
+
+  gl_Position = gl_Vertex;
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test
new file mode 100644
index 0000000..6af80c2
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test
@@ -0,0 +1,33 @@
+# Test implicitly sized arrays match explicitly sized arrays
+# across the same stage.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+varying vec4 color[];
+
+void f()
+{
+  color[3] = vec4(1, 0, 0, 1);
+}
+
+[vertex shader]
+#version 120
+
+varying vec4 color[4];
+
+void f();
+
+void main()
+{
+  f();
+  color[1] = vec4(1, 0, 0, 1);
+
+  gl_Position = gl_Vertex;
+}
+
+[test]
+link success
-- 
1.9.3



More information about the Piglit mailing list