This test sets different explicit location for same uniform from different shader stage.
v2: fix style issues (Anuj) v3: change to be a shader-runner test (Ian) Signed-off-by: Tapani Pälli <[email protected]> --- .../linker/set-explicit-location-twice.shader_test | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test new file mode 100644 index 0000000..9978aac --- /dev/null +++ b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test @@ -0,0 +1,26 @@ +# +# Tests setting 2 different explicit locations to same uniform variable. + +[require] +GLSL >= 1.10 +GL_ARB_explicit_uniform_location + +[vertex shader] +#extension GL_ARB_explicit_uniform_location: require +layout(location = 0) uniform vec4 foo; +vec4 vertex; +void main() +{ + gl_Position = vertex + foo; +} + +[fragment shader] +#extension GL_ARB_explicit_uniform_location: require +layout(location = 1) uniform vec4 foo; +void main() +{ + gl_FragColor = foo; +} + +[test] +link error -- 1.8.3.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
