glsl-1.10: add a test that has an a while loop with unconditional return

Submitted by Ilia Mirkin on Dec. 2, 2015, 11:44 p.m.

Details

Message ID 1449099847-14297-1-git-send-email-imirkin@alum.mit.edu
State New
Headers show
Series "glsl-1.10: add a test that has an a while loop with unconditional return" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Ilia Mirkin Dec. 2, 2015, 11:44 p.m.
Signed-off-by: Ilia Mirkin <imirkin@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

Patch hide | download patch | download mbox

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

Comments

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

On 12/03/2015 01:44 AM, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin@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
>