[Piglit] [PATCH] Add a test for mix where the second operand is zero.

Paul Berry stereotype441 at gmail.com
Sat Mar 1 09:43:02 PST 2014


On 1 March 2014 01:39, Kenneth Graunke <kenneth at whitecape.org> wrote:

> Reproduces a bug in Mesa's algebraic optimization pass.
>
> See Mesa patch:
> "glsl: Fix broken LRP algebraic optimization."
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>

You might want to consider making this a shader_runner test, so that it
confirms that the Mesa fix not only eliminates the crash, but also produces
the correct computation.


> ---
>  tests/spec/glsl-1.10/compiler/glsl-fs-mix-y-zero.frag | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>  create mode 100644 tests/spec/glsl-1.10/compiler/glsl-fs-mix-y-zero.frag
>
> diff --git a/tests/spec/glsl-1.10/compiler/glsl-fs-mix-y-zero.frag
> b/tests/spec/glsl-1.10/compiler/glsl-fs-mix-y-zero.frag
> new file mode 100644
> index 0000000..a0abb46
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/glsl-fs-mix-y-zero.frag
> @@ -0,0 +1,10 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.10
> +// [end config]
> +
> +uniform vec4 u;
> +void main()
> +{
> +    gl_FragColor = mix(u, vec4(0), u);
> +}
> --
> 1.9.0
>
> _______________________________________________
> 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/20140301/6b854ef4/attachment.html>


More information about the Piglit mailing list