[Piglit] [PATCH 08/16] glsl-1.40: Refector pass-through vertex shader out to its own file

Ian Romanick idr at freedesktop.org
Mon Aug 26 11:37:07 PDT 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Instead of replicating the same code over and over and over, just put it
in one file that each shader test can reference.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../glsl-1.40/execution/gl_DepthRangeParameters.shader_test   | 11 ++---------
 tests/spec/glsl-1.40/passthrough.vs                           |  6 ++++++
 tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test      | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test      | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test       | 11 ++---------
 .../uniform_buffer/fs-float-array-const-index.shader_test     | 11 ++---------
 .../uniform_buffer/fs-float-array-variable-index.shader_test  | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test     | 11 ++---------
 .../glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test    | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test       | 11 ++---------
 .../uniform_buffer/fs-saturated-vec-array.shader_test         | 11 ++---------
 .../uniform_buffer/fs-struct-copy-complicated.shader_test     | 11 ++---------
 .../spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test  | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test | 11 ++---------
 tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test     | 11 ++---------
 .../spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test  | 11 ++---------
 18 files changed, 40 insertions(+), 153 deletions(-)
 create mode 100644 tests/spec/glsl-1.40/passthrough.vs

diff --git a/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test b/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test
index eec89fc..cf97304 100644
--- a/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test
+++ b/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/passthrough.vs b/tests/spec/glsl-1.40/passthrough.vs
new file mode 100644
index 0000000..d002d71
--- /dev/null
+++ b/tests/spec/glsl-1.40/passthrough.vs
@@ -0,0 +1,6 @@
+in vec4 vertex;
+
+void main()
+{
+	gl_Position = vertex;
+}
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test
index bf3c972..05e4ede 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test
index 42028a9..c94cc74 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test
index 99e6b45..e345037 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test
index 2c2b032..d2bbb00 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
index c2d8fa8..2b22ea4 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test
index 9b7876a..5c3e9eb 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test
index 93bf6ee..6e6e9d4 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test
index 738d982..28b8f35 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test
index 3fb3fce..3754643 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test
index 9c7585b..2060d44 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test
index d540878..fdd21cb 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
index c799691..1e39193 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
index 2ed1d8e..b99b8b7 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
index b2a0141..069a2c6 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
index a7cd194..56d8d36 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test
index 1ad730c..e288bb0 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test
@@ -1,15 +1,8 @@
 [require]
 GLSL >= 1.40
 
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [fragment shader]
 #version 140
-- 
1.8.1.4



More information about the Piglit mailing list