[Piglit] [PATCH] shaders: Reproduce a bug in the i965/anv backend compiler

Jason Ekstrand jason at jlekstrand.net
Thu Feb 14 20:09:15 UTC 2019


rb

On Thu, Feb 14, 2019 at 12:49 PM Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> We were dropping negations/abs while trying to optimize.
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109601
> ---
>  tests/shaders/glsl-bug-109601.shader_test | 28 +++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 tests/shaders/glsl-bug-109601.shader_test
>
> diff --git a/tests/shaders/glsl-bug-109601.shader_test
> b/tests/shaders/glsl-bug-109601.shader_test
> new file mode 100644
> index 000000000..c060233e9
> --- /dev/null
> +++ b/tests/shaders/glsl-bug-109601.shader_test
> @@ -0,0 +1,28 @@
> +[require]
> +GL >= 3.0
> +GLSL >= 3.30
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 330
> +#extension GL_ARB_shader_storage_buffer_object: require
> +
> +uniform int v1;
> +uniform float v2;
> +
> +void main()
> +{
> +       float a = -(v1 >> 16);
> +       gl_FragColor = vec4(a * v2,0.0f,0.0f,1.0f);
> +}
> +
> +[test]
> +clear color 0.0 0.0 0.0 0.0
> +clear
> +
> +uniform int v1 0x10000
> +uniform float v2 -1
> +
> +draw rect -1 -1 2 2
> +probe all rgba 1.0 0.0 0.0 1.0
> --
> 2.20.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190214/726c61f8/attachment.html>


More information about the Piglit mailing list