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

Stuart Abercrombie sabercrombie at chromium.org
Thu Dec 13 10:00:04 PST 2012


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.

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?

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


More information about the Piglit mailing list