This test sets explicit location in vertex shader but does not set it for same uniform in the fragment shader.
v2: fix style issues (Anuj) v3: change to be a shader-runner test (Ian) Signed-off-by: Tapani Pälli <[email protected]> --- ...t-explicit-location-once-decl-twice.shader_test | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test new file mode 100644 index 0000000..e044d7a --- /dev/null +++ b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test @@ -0,0 +1,27 @@ +# +# Tests setting explicit location to uniform in vertex stage and declaring +# same uniform without explicit location in fragment stage. + +[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 +uniform vec4 foo; +void main() +{ + gl_FragColor = foo; +} + +[test] +link success -- 1.8.3.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
