[Piglit] [PATCH] glsl-1.10: add a test that has an a while loop with unconditional return

Tapani Pälli tapani.palli at intel.com
Wed Dec 2 21:44:26 PST 2015


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 12/03/2015 01:44 AM, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>
> This crashes on nouveau, passes on i965/hsw and llvmpipe.
>
>   .../glsl-1.10/execution/fs-loop-return.shader_test   | 20 ++++++++++++++++++++
>   1 file changed, 20 insertions(+)
>   create mode 100644 tests/spec/glsl-1.10/execution/fs-loop-return.shader_test
>
> diff --git a/tests/spec/glsl-1.10/execution/fs-loop-return.shader_test b/tests/spec/glsl-1.10/execution/fs-loop-return.shader_test
> new file mode 100644
> index 0000000..701bf60
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/execution/fs-loop-return.shader_test
> @@ -0,0 +1,20 @@
> +# This test verifies that loop unrolling properly interprets a variety
> +# of ways of specifying loop bounds.
> +
> +[require]
> +GLSL >= 1.10
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +void main()
> +{
> +  gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
> +  while (true) {
> +    return;
> +  }
> +}
> +
> +[test]
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
>


More information about the Piglit mailing list