[Piglit] [PATCH 16/16] arb_shading_language_420pack: Refector pass-through fragment shader out to its own file

Ian Romanick idr at freedesktop.org
Mon Aug 26 11:37:15 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>
Cc: Matt Turner <mattst88 at gmail.com>
---
 .../execution/aggregate-initializer-matrix.shader_test            | 8 ++------
 .../execution/aggregate-initializer-sized-array.shader_test       | 8 ++------
 .../execution/aggregate-initializer-struct.shader_test            | 8 ++------
 .../execution/aggregate-initializer-unsized-array.shader_test     | 8 ++------
 tests/spec/arb_shading_language_420pack/execution/passthrough.fs  | 5 +++++
 5 files changed, 13 insertions(+), 24 deletions(-)
 create mode 100644 tests/spec/arb_shading_language_420pack/execution/passthrough.fs

diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
index f5da4c9..15cc7d9 100644
--- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
+++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test
@@ -37,12 +37,8 @@ void main()
     gl_Position = vertex;
 }
 
-[fragment shader]
-in vec4 color;
-
-void main() {
-    gl_FragColor = color;;
-}
+[fragment shader file]
+passthrough.fs
 
 [test]
 draw rect -1 -1 2 2
diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
index 5ac422d..035321e 100644
--- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
+++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test
@@ -45,12 +45,8 @@ void main()
     gl_Position = vertex;
 }
 
-[fragment shader]
-in vec4 color;
-
-void main() {
-    gl_FragColor = color;;
-}
+[fragment shader file]
+passthrough.fs
 
 [test]
 draw rect -1 -1 2 2
diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
index e11681e..6d5f619 100644
--- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
+++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-struct.shader_test
@@ -64,12 +64,8 @@ void main()
     gl_Position = vertex;
 }
 
-[fragment shader]
-in vec4 color;
-
-void main() {
-    gl_FragColor = color;;
-}
+[fragment shader file]
+passthrough.fs
 
 [test]
 draw rect -1 -1 2 2
diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
index 369ed8c..954b6a9 100644
--- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
+++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-unsized-array.shader_test
@@ -47,12 +47,8 @@ void main()
     gl_Position = vertex;
 }
 
-[fragment shader]
-in vec4 color;
-
-void main() {
-    gl_FragColor = color;;
-}
+[fragment shader file]
+passthrough.fs
 
 [test]
 draw rect -1 -1 2 2
diff --git a/tests/spec/arb_shading_language_420pack/execution/passthrough.fs b/tests/spec/arb_shading_language_420pack/execution/passthrough.fs
new file mode 100644
index 0000000..a084e9e
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/execution/passthrough.fs
@@ -0,0 +1,5 @@
+in vec4 color;
+
+void main() {
+    gl_FragColor = color;
+}
-- 
1.8.1.4



More information about the Piglit mailing list