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

Ian Romanick idr at freedesktop.org
Mon Aug 26 11:37:10 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>
---
 .../execution/geometry/generate-zero-primitives.shader_test   | 11 ++---------
 tests/spec/glsl-1.50/execution/passthrough.vs                 |  6 ++++++
 tests/spec/glsl-1.50/execution/sanity.shader_test             | 10 ++--------
 3 files changed, 10 insertions(+), 17 deletions(-)
 create mode 100644 tests/spec/glsl-1.50/execution/passthrough.vs

diff --git a/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test b/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test
index 94aadb1..63f65d9 100644
--- a/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test
+++ b/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test
@@ -2,15 +2,8 @@
 GL >= 3.2
 GLSL >= 1.50
 
-[vertex shader]
-#version 150
-
-in vec4 vertex;
-
-void main()
-{
-	gl_Position = vertex;
-}
+[vertex shader file]
+../passthrough.vs
 
 [geometry shader]
 #version 150
diff --git a/tests/spec/glsl-1.50/execution/passthrough.vs b/tests/spec/glsl-1.50/execution/passthrough.vs
new file mode 100644
index 0000000..d002d71
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/passthrough.vs
@@ -0,0 +1,6 @@
+in vec4 vertex;
+
+void main()
+{
+	gl_Position = vertex;
+}
diff --git a/tests/spec/glsl-1.50/execution/sanity.shader_test b/tests/spec/glsl-1.50/execution/sanity.shader_test
index cd8331d..57153de 100644
--- a/tests/spec/glsl-1.50/execution/sanity.shader_test
+++ b/tests/spec/glsl-1.50/execution/sanity.shader_test
@@ -4,14 +4,8 @@
 GL >= 3.1
 GLSL >= 1.50
 
-[vertex shader]
-#version 150
-
-in vec4 vertex;
-
-void main() {
-    gl_Position = vertex;
-}
+[vertex shader file]
+passthrough.vs
 
 [fragment shader]
 #version 150
-- 
1.8.1.4



More information about the Piglit mailing list