[Piglit] [PATCH] Remove #version from variable indexing shader tests.

Tom Gall tom.gall at linaro.org
Fri Dec 14 11:20:45 PST 2012


On Thu, Dec 13, 2012 at 12:00 PM, Stuart Abercrombie
<sabercrombie at chromium.org> wrote:
> The idea is to ultimately remove explicit #version directives from all
> .shader_test files, so we can just rely on GLSL >=, and then the ES
> analog, allowing these tests to run on GL or GLES -- what Paul Berry
> outlined a while back, basically.

I like this and it looks to be complimentary for what I've already
done for glslparser tests and complimentary for what I had in mind for
gles 2/3 support.

> This patch is confined to the variable indexing tests.  It removes
> #version outputting from
>
> tests/spec/glsl-1.10/variable-index-read.sh
> tests/spec/glsl-1.10/variable-index-write.sh
>
> and the files generated for 1.10/1.20 from these scripts.  I've
> included the script modification below.

> The follow-up was intended to be removal of #version from other
> .shader_test files, and other regularization like what I sent in
> before.
>
> Since other work is being done for GLES I don't know if this is still
> a reasonable way forward.  Thoughts?

I think it probably is. My aim for gles2 is to try and reuse much of
what is already there. Thus far I'm finding shader tests are a little
more fun for two reasons. GLSL ES version comparisons and GLSL version
comparisons need to be kept separate and there are situations where
unsurprisingly an expected pass for GLSL will be a fail for GLSL ES
and these situations are still good testcases.

I just started to dive into the spec/glsl-* dirs last night for gles2.
Was hoping by now to have some comments on my two glslparsertest
patches for gles2. Having some working gles2 tests in the mix I think
would be good to validate things are on the right path.

> Stuart
>
> diff --git a/tests/spec/glsl-1.10/variable-index-read.sh
> b/tests/spec/glsl-1.10/variable-index-read.sh
> index 12b0685..80cb078 100755
> --- a/tests/spec/glsl-1.10/variable-index-read.sh
> +++ b/tests/spec/glsl-1.10/variable-index-read.sh
> @@ -164,7 +164,6 @@ function emit_vs
>      fi
>
>      echo "[vertex shader]"
> -    echo "#version ${version/./}"
>      emit_globals $*
>
>      echo "void main()"
> @@ -218,7 +217,6 @@ emit_fs()
>      do_compare=$7
>
>      echo "[fragment shader]"
> -    echo "#version ${version/./}"
>      emit_globals $*
>
>      echo "void main()"
> diff --git a/tests/spec/glsl-1.10/variable-index-write.sh
> b/tests/spec/glsl-1.10/variable-index-write.sh
> index 449a750..96a4791 100755
> --- a/tests/spec/glsl-1.10/variable-index-write.sh
> +++ b/tests/spec/glsl-1.10/variable-index-write.sh
> @@ -177,7 +177,6 @@ function emit_fs
>      fi
>
>      echo "[fragment shader]"
> -    echo "#version ${version/./}"
>
>      emit_globals $*
>
> @@ -330,7 +329,6 @@ function emit_fs_wr_test
>      echo
>
>      echo "[vertex shader]"
> -    echo "#version ${version/./}"
>      echo "void main() { gl_Position = gl_ModelViewProjectionMatrix *
> gl_Vertex; }"
>      echo
>
> @@ -353,7 +351,6 @@ function emit_vs_wr_test
>      echo
>
>      echo "[vertex shader]"
> -    echo "#version ${version/./}"
>      emit_globals $*
>
>      echo "void main()"
> @@ -374,7 +371,6 @@ function emit_vs_wr_test
>
>      if [ "x$mode" != "xvarying" ];then
>         echo "[fragment shader]"
> -       echo "#version ${version/./}"
>         echo "void main() { gl_FragColor = gl_Color; }"
>         echo
>      else
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Tom Gall <tom.gall at linaro.org>

--
Regards,
Tom

"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Graphics Working Group | Linaro.org │ Open source software for ARM SoCs
w) tom.gall att linaro.org
h) tom_gall att mac.com


More information about the Piglit mailing list