[Piglit] [PATCH 1/2] glsl-1.50: test for interface block name mismatch error
Matt Turner
mattst88 at gmail.com
Mon Jul 22 15:49:49 PDT 2013
This tests to see if an interface block with a name mismatch
between the VS and FS causes a link error.
---
...terface-blocks-member-name-mismatch.shader_test | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test
diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test
new file mode 100644
index 0000000..cc0fd4c
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/interface-blocks-member-name-mismatch.shader_test
@@ -0,0 +1,37 @@
+# Tests that a link error occurs when an interface block member's name
+# differs between the vertex and fragment shaders.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "Matched block names within an interface (as defined above) must match
+# in terms of having the same number of declarations with the same
+# sequence of types and the same sequence of member names, as well as
+# having the same member-wise layout qualification (see next section)."
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform block {
+ vec4 a; // a is named b in FS
+} inst_a;
+
+void main()
+{
+ gl_Position = vec4(0.0);
+}
+
+[fragment shader]
+#version 150
+
+uniform block {
+ vec4 b; // b is named a in VS
+} inst_b;
+
+void main()
+{
+}
+
+[test]
+link error
+
--
1.8.1.5
More information about the Piglit
mailing list