[Piglit] [V3 4/4] ARB_explicit_uniform_location: set location once but decl twice
Anuj Phogat
anuj.phogat at gmail.com
Tue Mar 18 09:50:56 PDT 2014
On Mon, Mar 17, 2014 at 6:04 AM, Tapani Pälli <tapani.palli at intel.com> wrote:
> 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)
>
It might be worth testing that same uniform locations work fine:
[vertex shader]
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform vec4 foo;
[fragment shader]
#extension GL_ARB_explicit_uniform_location: require
layout(location = 0) uniform vec4 foo;
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> ...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
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list