[Piglit] [PATCH 2/2] glsl-1.50: test for interface block qualifier mismatch error
Matt Turner
mattst88 at gmail.com
Mon Jul 22 15:49:50 PDT 2013
This tests to see if an interface block with a qualifier mismatch
between the VS and FS causes a link error.
---
...ce-blocks-member-qualifier-mismatch.shader_test | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-member-qualifier-mismatch.shader_test
diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-member-qualifier-mismatch.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-member-qualifier-mismatch.shader_test
new file mode 100644
index 0000000..e800ab9
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/interface-blocks-member-qualifier-mismatch.shader_test
@@ -0,0 +1,37 @@
+# Tests that a link error occurs when an interface block member's qualifier
+# 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 {
+ layout(column_major) mat4 m; // m is row_major in FS
+} inst_a;
+
+void main()
+{
+ gl_Position = vec4(0.0);
+}
+
+[fragment shader]
+#version 150
+
+uniform block {
+ layout(row_major) mat4 m; // m is column_major in VS
+} inst_b;
+
+void main()
+{
+}
+
+[test]
+link error
+
--
1.8.1.5
More information about the Piglit
mailing list