[Piglit] [PATCH 03/11] shaders: port "GLSL link mismatched global initailizer, 2 shaders" to shader_runner

Dylan Baker dylan at pnwbakers.com
Fri May 6 00:48:38 UTC 2016


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/all.py                                        |  5 -----
 tests/shaders/glsl-link-initializer-01d.vert        |  6 ------
 ...lobal-initializer-mismatch-2-shaders.shader_test | 21 +++++++++++++++++++++
 3 files changed, 21 insertions(+), 11 deletions(-)
 delete mode 100644 tests/shaders/glsl-link-initializer-01d.vert
 create mode 100644 tests/spec/glsl-1.10/linker/global-initializer-mismatch-2-shaders.shader_test

diff --git a/tests/all.py b/tests/all.py
index 3ba0432..2fa732c 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -594,11 +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-01b.vert'),
-       os.path.join('shaders', 'glsl-link-initializer-01d.vert'),
-       'fail'],
-      'GLSL link mismatched global initializer, 2 shaders')
-    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'),
diff --git a/tests/shaders/glsl-link-initializer-01d.vert b/tests/shaders/glsl-link-initializer-01d.vert
deleted file mode 100644
index ad8f1b3..0000000
--- a/tests/shaders/glsl-link-initializer-01d.vert
+++ /dev/null
@@ -1,6 +0,0 @@
-float global_variable = 2.0;
-
-void main()
-{
-  gl_Position = gl_Vertex;
-}
diff --git a/tests/spec/glsl-1.10/linker/global-initializer-mismatch-2-shaders.shader_test b/tests/spec/glsl-1.10/linker/global-initializer-mismatch-2-shaders.shader_test
new file mode 100644
index 0000000..37e210b
--- /dev/null
+++ b/tests/spec/glsl-1.10/linker/global-initializer-mismatch-2-shaders.shader_test
@@ -0,0 +1,21 @@
+[require]
+GLSL >= 1.10
+
+[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;
+
+void main()
+{
+  gl_Position = gl_Vertex;
+}
+
+[test]
+link error
-- 
2.8.2



More information about the Piglit mailing list