[Piglit] [PATCH 07/11] shaders: port "GLSL link mismatched global initializer expression" to shader_test
Dylan Baker
dylan at pnwbakers.com
Fri May 6 00:48:42 UTC 2016
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
tests/all.py | 5 ----
tests/shaders/glsl-link-initializer-06a.vert | 8 -------
tests/shaders/glsl-link-initializer-06b.vert | 10 --------
...al-initializer-unmatched-expression.shader_test | 27 ++++++++++++++++++++++
4 files changed, 27 insertions(+), 23 deletions(-)
delete mode 100644 tests/shaders/glsl-link-initializer-06a.vert
delete mode 100644 tests/shaders/glsl-link-initializer-06b.vert
create mode 100644 tests/spec/glsl-1.10/linker/global-initializer-unmatched-expression.shader_test
diff --git a/tests/all.py b/tests/all.py
index 4c04909..4fa5d5b 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -596,11 +596,6 @@ with profile.group_manager(PiglitGLTest, 'shaders') as g:
g(['glsl-link-initializer-03'],
'GLSL link two programs, global initializer')
g(['glsl-link-test',
- os.path.join('shaders', 'glsl-link-initializer-06a.vert'),
- os.path.join('shaders', 'glsl-link-initializer-06b.vert'),
- 'fail'],
- 'GLSL link mismatched global initializer expression')
- g(['glsl-link-test',
os.path.join('shaders', 'glsl-link-invariant-01a.vert'),
os.path.join('shaders', 'glsl-link-invariant-01b.vert'),
'fail'],
diff --git a/tests/shaders/glsl-link-initializer-06a.vert b/tests/shaders/glsl-link-initializer-06a.vert
deleted file mode 100644
index f794e24..0000000
--- a/tests/shaders/glsl-link-initializer-06a.vert
+++ /dev/null
@@ -1,8 +0,0 @@
-uniform float angle;
-uniform float scale;
-float global_variable = cos(angle) * scale;
-
-float function(void)
-{
- return global_variable;
-}
\ No newline at end of file
diff --git a/tests/shaders/glsl-link-initializer-06b.vert b/tests/shaders/glsl-link-initializer-06b.vert
deleted file mode 100644
index 330e343..0000000
--- a/tests/shaders/glsl-link-initializer-06b.vert
+++ /dev/null
@@ -1,10 +0,0 @@
-uniform float angle;
-uniform float scale;
-float global_variable = scale * sin(angle);
-
-float function(void);
-
-void main()
-{
- gl_Position = gl_Vertex * global_variable * function();
-}
diff --git a/tests/spec/glsl-1.10/linker/global-initializer-unmatched-expression.shader_test b/tests/spec/glsl-1.10/linker/global-initializer-unmatched-expression.shader_test
new file mode 100644
index 0000000..6c5940e
--- /dev/null
+++ b/tests/spec/glsl-1.10/linker/global-initializer-unmatched-expression.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+uniform float angle;
+uniform float scale;
+float global_variable = cos(angle) * scale;
+
+float function(void)
+{
+ return global_variable;
+}
+
+[vertex shader]
+uniform float angle;
+uniform float scale;
+float global_variable = scale * sin(angle);
+
+float function(void);
+
+void main()
+{
+ gl_Position = gl_Vertex * global_variable * function();
+}
+
+[test]
+link error
--
2.8.2
More information about the Piglit
mailing list