[Piglit] [PATCH] Add new test to exercise GLSL compiler bug involving unused const arrays

Chris Forbes chrisf at ijw.co.nz
Fri Jan 2 12:05:25 PST 2015


Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
On Jan 3, 2015 8:53 AM, "Brian Paul" <brianp at vmware.com> wrote:

> Currently, this test causes the GLSL compiler to abort in ir_validate.cpp
> with the message:
> "ir_dereference_variable @ 0x182ee80 specifies undeclared variable
> `unused_array' @ 0x182ed80"
> ---
>  .../compiler/unused-const-array.shader_test        | 26
> ++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>  create mode 100644
> tests/spec/glsl-1.20/compiler/unused-const-array.shader_test
>
> diff --git a/tests/spec/glsl-1.20/compiler/unused-const-array.shader_test
> b/tests/spec/glsl-1.20/compiler/unused-const-array.shader_test
> new file mode 100644
> index 0000000..c3459a1
> --- /dev/null
> +++ b/tests/spec/glsl-1.20/compiler/unused-const-array.shader_test
> @@ -0,0 +1,26 @@
> +# Test declaring an unused const array to exercise a Mesa GLSL compiler
> bug.
> +[require]
> +GLSL >= 1.20
> +
> +[vertex shader]
> +void
> +main()
> +{
> +       gl_Position = gl_Vertex;
> +}
> +
> +
> +[fragment shader]
> +
> +const int unused_array[1] = int[1](1);
> +
> +void
> +main()
> +{
> +       gl_FragColor = vec4(0, 1, 0, 1);
> +}
> +
> +
> +[test]
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
> --
> 1.9.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150103/85c8ca9e/attachment.html>


More information about the Piglit mailing list