[Piglit] [PATCH] tests/glslparsertest/glsl2: Unsigned array index test

Dylan Baker baker.dylan.c at gmail.com
Wed Sep 3 11:36:08 PDT 2014


Hi tiffany,

We're trying not to add more tests to ambiguous locations like glsl2,
the goal is to put tests in locations based on the extension, gl, or
glsl version the test exercises. Looking at the content of your test it
belongs in tests/spec/glsl-1.30/compiler/structure-and-array-operations

We also like descriptive file names, maybe array-index-as-uint.vert,
like the frag test for the same functionality?

 -Dylan

On Wednesday, September 03, 2014 02:22:04 PM tiffany wrote:
> This test corresponds with commit 7f61ab2f20633443834ff8e832892d5c4cc1c675, which fixes an assertion in Mesa when indexing an array can cause a failure under certain circumstances.
> ---
>  tests/glslparsertest/glsl2/array-index.frag | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 tests/glslparsertest/glsl2/array-index.frag
> 
> diff --git a/tests/glslparsertest/glsl2/array-index.frag b/tests/glslparsertest/glsl2/array-index.frag
> new file mode 100644
> index 0000000..41af438
> --- /dev/null
> +++ b/tests/glslparsertest/glsl2/array-index.frag
> @@ -0,0 +1,19 @@
> +/* From page 44 (page 50 of the PDF) of the GLSL 1.30 spec:
> + *
> + *    "Array elements are accessed using an expression whose type is int or uint."
> + *
> + * [config]
> + * expect_result: pass
> + * glsl_version: 1.30
> + * [end config]
> + */
> +#version 130
> +flat in uint i;
> +out vec4 color;
> +
> +const float a[4] = float[4](0.0, 1.0, 2.0, 3.0);
> +
> +void main()
> +{
> +	color = vec4(a[i]);
> +}
> -- 
> 2.1.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140903/1f5b4d1a/attachment.sig>


More information about the Piglit mailing list