[Piglit] [PATCH 04/11] shaders: port "GLSL link mismatched global-initalizer, 3 shaders" to shader_runner
Dylan Baker
dylan at pnwbakers.com
Fri May 6 00:48:39 UTC 2016
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
tests/all.py | 6 -----
tests/shaders/glsl-link-initializer-01a.vert | 6 -----
tests/shaders/glsl-link-initializer-01b.vert | 6 -----
tests/shaders/glsl-link-initializer-01c.vert | 6 -----
...obal-initializer-mismatch-3-shaders.shader_test | 29 ++++++++++++++++++++++
5 files changed, 29 insertions(+), 24 deletions(-)
delete mode 100644 tests/shaders/glsl-link-initializer-01a.vert
delete mode 100644 tests/shaders/glsl-link-initializer-01b.vert
delete mode 100644 tests/shaders/glsl-link-initializer-01c.vert
create mode 100644 tests/spec/glsl-1.10/linker/global-initializer-mismatch-3-shaders.shader_test
diff --git a/tests/all.py b/tests/all.py
index 2fa732c..0e0e68d 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -594,12 +594,6 @@ with profile.group_manager(PiglitGLTest, 'shaders') as g:
g(['point-vertex-id', 'gl_VertexID', 'gl_InstanceID', 'divisor'])
g(['glsl-vs-int-attrib'])
g(['glsl-link-test',
- os.path.join('shaders', 'glsl-link-initializer-01a.vert'),
- os.path.join('shaders', 'glsl-link-initializer-01b.vert'),
- os.path.join('shaders', 'glsl-link-initializer-01c.vert'),
- 'fail'],
- 'GLSL link mismatched global initializer, 3 shaders')
- g(['glsl-link-test',
os.path.join('shaders', 'glsl-link-initializer-02a.vert'),
os.path.join('shaders', 'glsl-link-initializer-02b.vert'),
'fail'],
diff --git a/tests/shaders/glsl-link-initializer-01a.vert b/tests/shaders/glsl-link-initializer-01a.vert
deleted file mode 100644
index 29a3193..0000000
--- a/tests/shaders/glsl-link-initializer-01a.vert
+++ /dev/null
@@ -1,6 +0,0 @@
-float global_variable;
-
-void main()
-{
- gl_Position = gl_Vertex;
-}
diff --git a/tests/shaders/glsl-link-initializer-01b.vert b/tests/shaders/glsl-link-initializer-01b.vert
deleted file mode 100644
index a13bd28..0000000
--- a/tests/shaders/glsl-link-initializer-01b.vert
+++ /dev/null
@@ -1,6 +0,0 @@
-float global_variable = 1.0;
-
-/* This works around a bug in Apple's GLSL compiler. Their compiler won't allow
- * a shader doesn't have any executable code.
- */
-void apple_work_around1() {}
diff --git a/tests/shaders/glsl-link-initializer-01c.vert b/tests/shaders/glsl-link-initializer-01c.vert
deleted file mode 100644
index e8dba5e..0000000
--- a/tests/shaders/glsl-link-initializer-01c.vert
+++ /dev/null
@@ -1,6 +0,0 @@
-float global_variable = 2.0;
-
-/* This works around a bug in Apple's GLSL compiler. Their compiler won't allow
- * a shader doesn't have any executable code.
- */
-void apple_work_around2() {}
diff --git a/tests/spec/glsl-1.10/linker/global-initializer-mismatch-3-shaders.shader_test b/tests/spec/glsl-1.10/linker/global-initializer-mismatch-3-shaders.shader_test
new file mode 100644
index 0000000..4daf9b6
--- /dev/null
+++ b/tests/spec/glsl-1.10/linker/global-initializer-mismatch-3-shaders.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+float global_variable;
+
+void main()
+{
+ gl_Position = gl_Vertex;
+}
+
+[vertex shader]
+float global_variable = 1.0;
+
+/* This works around a bug in Apple's GLSL compiler. Their compiler won't allow
+ * a shader doesn't have any executable code.
+ */
+void apple_work_around1() {}
+
+[vertex shader]
+float global_variable = 2.0;
+
+/* This works around a bug in Apple's GLSL compiler. Their compiler won't allow
+ * a shader doesn't have any executable code.
+ */
+void apple_work_around2() {}
+
+[test]
+link error
--
2.8.2
More information about the Piglit
mailing list