aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2013-02-26 16:24:36 -0800
committerJordan Justen <jordan.l.justen@intel.com>2013-03-01 14:19:31 -0800
commitbd0810570cbed9ccfb501db84826097aebdde767 (patch)
tree0ed2ea3fbf4d9ed570a58e848071fc7c99c6833a
parent922a1da645177dc960fce66ec1923d6521861c36 (diff)
glsl-es-3.00: add uniform block type mismatch link test
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
-rw-r--r--tests/spec/glsl-es-3.00/linker/interface-blocks-member-type-mismatch.shader_test39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-3.00/linker/interface-blocks-member-type-mismatch.shader_test b/tests/spec/glsl-es-3.00/linker/interface-blocks-member-type-mismatch.shader_test
new file mode 100644
index 00000000..d5868673
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/linker/interface-blocks-member-type-mismatch.shader_test
@@ -0,0 +1,39 @@
+# Tests that a link error occurs when an interface block member's type
+# differs between the vertex and fragment shaders.
+#
+# GLSL_ES_Specification_3.00.3, 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, precisions and the same sequence of member names,
+# as well as having the same member-wise layout qualification (see next
+# section)."
+[require]
+GL ES >= 3.0
+GLSL ES >= 3.00
+
+[vertex shader]
+#version 300 es
+
+uniform block {
+ vec4 a; // a is vec3 in FS
+} inst_a;
+
+void main()
+{
+ gl_Position = vec4(0.0);
+}
+
+[fragment shader]
+#version 300 es
+
+uniform block {
+ vec3 a; // a is vec4 in VS
+} inst_b;
+
+void main()
+{
+}
+
+[test]
+link error
+