Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> --- .../linker/uniform-type-mismatch.shader_test | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/spec/glsl-1.10/linker/uniform-type-mismatch.shader_test
diff --git a/tests/spec/glsl-1.10/linker/uniform-type-mismatch.shader_test b/tests/spec/glsl-1.10/linker/uniform-type-mismatch.shader_test new file mode 100644 index 0000000..82f8a18 --- /dev/null +++ b/tests/spec/glsl-1.10/linker/uniform-type-mismatch.shader_test @@ -0,0 +1,29 @@ +# Tests that a link error occurs when an uniform's type +# differs between the vertex and fragment shaders. +# +# GLSLangSpec.Full.1.10.59, 4.3.5 Uniform: +# "If multiple shaders are linked together, then they will +# share a single global uniform name space. Hence, types +# of uniforms with the same name must match across all +# shaders that are linked into a single executable." +[require] +GLSL >= 1.10 + +[vertex shader] +uniform vec4 a; // a is vec3 in FS + +void main() +{ + gl_Position = vec4(0.0); +} + +[fragment shader] +uniform vec3 a; // a is vec4 in VS + +void main() +{ +} + +[test] +link error + -- 1.7.10.4 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit