Test results: Nvidia GeForce 840M - NVIDIA 352.41: fail Mesa 11.2 (dev): pass --- ...fs-explicit-location-mismatch-array.shader_test | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-mismatch-array.shader_test
diff --git a/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-mismatch-array.shader_test b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-mismatch-array.shader_test new file mode 100644 index 0000000..e359d63 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-mismatch-array.shader_test @@ -0,0 +1,50 @@ +// From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.5 spec: +// +// "For the purposes of determining if a non-vertex input matches an output +// from a previous shader stage, the location layout qualifier (if any) +// must match." + +[require] +GLSL >= 1.40 +GL_ARB_separate_shader_objects + +[vertex shader] +#version 140 +#extension GL_ARB_separate_shader_objects : require + +in vec4 piglit_vertex; + +layout(location = 0) out vec4 out1[2]; +layout(location = 3) out vec4 out2; + +void main() +{ + gl_Position = piglit_vertex; + out1[0] = vec4(1.0, 0.0, 0.0, 1.0); + out1[1] = vec4(1.0, 1.0, 0.0, 1.0); + out2 = vec4(0.0); +} + +[fragment shader] +#version 140 +#extension GL_ARB_separate_shader_objects : require + +uniform int i; + +layout(location = 1) in vec4 out1[2]; +layout(location = 3) in vec4 out2; + +out vec4 color; + +void main() +{ + if (i == 0) + color = out1[0]; + else if (i == 1) + color = out1[1]; + else + color = out2; +} + +[test] +link error -- 2.4.3 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit