[Piglit] [PATCH] gpu_shader5: Add a test that uses an absurd number of texture arguments

Chris Forbes chrisf at ijw.co.nz
Sat Jan 10 02:22:17 PST 2015


On Sat, Jan 10, 2015 at 7:27 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> This adds a test that uses an indirect offset into an array of 2D shadow
> samplers with a textureProjGradOffset.  The primary purpse of this is to
> use a lot of arguments with an indirect offset.  This hits a bug in the
> current NIR code where we originally assumed a max of 4 texture arguments.
> ---
>  .../compiler/indirect-projGradOffset-shadow.frag       | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100644 tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag
>
> diff --git a/tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag b/tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag
> new file mode 100644
> index 0000000..43bbe0b
> --- /dev/null
> +++ b/tests/spec/arb_gpu_shader5/compiler/indirect-projGradOffset-shadow.frag
> @@ -0,0 +1,18 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.30
> +// [end config]
> +#version 130
> +#extension GL_ARB_gpu_shader5: require
> +
> +uniform int i;
> +uniform vec4 coord;
> +uniform ivec2 offset;

Nothing uses this?

> +uniform sampler2DShadow s[5];
> +
> +void main()
> +{
> +  float f = textureProjGradOffset(s[i], coord, coord.xy, coord.zw,
> +                                 ivec2(43, 7));

The offset components should really be restricted to -8/+7.

> +  gl_FragColor = vec4(0, f, 0, 1);
> +}
> --
> 2.2.0

Otherwise,

Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list