[Mesa-dev] [PATCH 08/10] glsl: Add a test for not array splitting function arguments.

Kenneth Graunke kenneth at whitecape.org
Thu Apr 19 00:16:56 PDT 2012


On 04/16/2012 04:59 PM, Eric Anholt wrote:
> I wouldn't be able to trigger this at the piglit level because of
> inlining.  And the bug I was concerned about can't be triggered
> because we don't do array splitting on in/out variables (though I've
> wanted to change that).
> ---
>   src/glsl/tests/.gitignore                          |    1 +
>   src/glsl/tests/lower_jumps/.gitignore              |    1 -
>   .../array_split_function.opt_test                  |   12 +++
>   .../array_split_function.opt_test.expected         |   92 ++++++++++++++++++++
>   4 files changed, 105 insertions(+), 1 deletion(-)
>   delete mode 100644 src/glsl/tests/lower_jumps/.gitignore
>   create mode 100755 src/glsl/tests/optimize_array_splitting/array_split_function.opt_test
>   create mode 100644 src/glsl/tests/optimize_array_splitting/array_split_function.opt_test.expected
>
> diff --git a/src/glsl/tests/.gitignore b/src/glsl/tests/.gitignore
> index f3c7a7c..8d245c0 100644
> --- a/src/glsl/tests/.gitignore
> +++ b/src/glsl/tests/.gitignore
> @@ -1 +1,2 @@
> +*/*.out
>   Makefile
> diff --git a/src/glsl/tests/lower_jumps/.gitignore b/src/glsl/tests/lower_jumps/.gitignore
> deleted file mode 100644
> index f47cb20..0000000
> --- a/src/glsl/tests/lower_jumps/.gitignore
> +++ /dev/null
> @@ -1 +0,0 @@
> -*.out
> diff --git a/src/glsl/tests/optimize_array_splitting/array_split_function.opt_test b/src/glsl/tests/optimize_array_splitting/array_split_function.opt_test
> new file mode 100755
> index 0000000..9f3d2bf
> --- /dev/null
> +++ b/src/glsl/tests/optimize_array_splitting/array_split_function.opt_test
> @@ -0,0 +1,12 @@
> +#!/bin/bash
> +#
> +# This file was generated by create_test_cases.py.
> +#
> +# If a loop contains a conditional break at the bottom of it,
> +# it should not be lowered if it is in the then-clause.

I'm pretty sure this comment is wrong. :)  Otherwise,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

> +../glsl_test optpass --quiet 'optimize_split_arrays'<<EOF
> +vec4 func(vec4[2] arg)
> +{
> +	return arg[1];
> +}
> +EOF


More information about the mesa-dev mailing list