[Piglit] [PATCH] Add glsl-1.20/execution/vsfs-unused-array-member.shader_test

Tapani Pälli tapani.palli at intel.com
Tue Jul 26 10:29:50 UTC 2016


nitpick: did not spot anything requiring GLSL 1.20, 1.10 should be 
enough for these shaders;

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 07/25/2016 07:05 PM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Currently fails due to an error in Gallium st_glsl_to_tgsi. Observed in the
> game Overlord.
> ---
> I'm also going to send out a candidate fix to mesa-dev in a moment.
>
>  .../execution/vsfs-unused-array-member.shader_test | 41 ++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 tests/spec/glsl-1.20/execution/vsfs-unused-array-member.shader_test
>
> diff --git a/tests/spec/glsl-1.20/execution/vsfs-unused-array-member.shader_test b/tests/spec/glsl-1.20/execution/vsfs-unused-array-member.shader_test
> new file mode 100644
> index 0000000..821c57a
> --- /dev/null
> +++ b/tests/spec/glsl-1.20/execution/vsfs-unused-array-member.shader_test
> @@ -0,0 +1,41 @@
> +# This test verifies that varyings are assigned correctly when a fragment
> +# shader doesn't read from all elements of a varying array.
> +#
> +# This used to fail due to a bug in st/mesa that was visible in Overlord.
> +
> +[require]
> +GLSL >= 1.20
> +
> +[vertex shader]
> +#version 120
> +
> +uniform vec4 data;
> +
> +varying vec4 a[3];
> +varying float b;
> +
> +void main()
> +{
> +  a[0] = data.xxxx;
> +  a[1] = data.yyyy;
> +  a[2] = data.zzzz;
> +  b = data.w;
> +  gl_Position = gl_Vertex;
> +}
> +
> +[fragment shader]
> +#version 120
> +
> +varying vec4 a[3];
> +varying float b;
> +
> +void main()
> +{
> +  gl_FragColor = vec4(a[0].x, a[2].x, b, 1.0);
> +}
> +
> +[test]
> +uniform vec4 data 0.2 0.4 0.6 0.8
> +
> +draw rect -1 -1 2 2
> +probe all rgba 0.2 0.6 0.8 1.0
>


More information about the Piglit mailing list