[Piglit] [PATCH] glsl-1.10: another test for min max optimisation pass
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Jan 5 23:32:13 UTC 2017
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
On 05/01/17 23:20, Timothy Arceri wrote:
> This simple test exposes a bug in the GLSL IR optimisation pass in
> Mesa master.
> ---
> .../glsl-1.10/execution/fs-min-min-min.shader_test | 32 ++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 tests/spec/glsl-1.10/execution/fs-min-min-min.shader_test
>
> diff --git a/tests/spec/glsl-1.10/execution/fs-min-min-min.shader_test b/tests/spec/glsl-1.10/execution/fs-min-min-min.shader_test
> new file mode 100644
> index 0000000..35ddeb9
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/execution/fs-min-min-min.shader_test
> @@ -0,0 +1,32 @@
> +[require]
> +GLSL >= 1.10
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +
> +uniform float u;
> +uniform float u2;
> +
> +void main()
> +{
> + float a = u;
> + float b = u2;
> +
> + a = min(a, 0.35);
> + b = min(b, 0.35);
> +
> + float c = min(a, b);
> +
> + gl_FragColor = vec4(0.0, c, 0.0, 1.0);
> +}
> +
> +[test]
> +clear color 0.2 0.2 0.2 0.2
> +clear
> +
> +uniform float u 0.75
> +uniform float u2 0.75
> +
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 0.35 0.0 1.0
More information about the Piglit
mailing list