diff options
author | Matt Turner <mattst88@gmail.com> | 2013-07-22 15:36:17 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2013-07-23 12:05:37 -0700 |
commit | cd73bb8db4896d7b18b07c40a2a0f8498dee4d8f (patch) | |
tree | 9c3bd4782425c4c3692371419c4d36ec7358d96d /tests/spec | |
parent | effb103a099574f68a71f00243df12eaa597095e (diff) |
glsl-1.50: test for interface block qualifier mismatch error
This tests to see if an interface block with a qualifier mismatch
between the VS and FS causes a link error.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'tests/spec')
-rw-r--r-- | tests/spec/glsl-1.50/linker/interface-blocks-member-qualifier-mismatch.shader_test | 37 |
1 files changed, 37 insertions, 0 deletions
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 000000000..e800ab91d --- /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 + |