glsl-1.50: fix some linker tests

Message ID 1419401541-698-1-git-send-email-t_arceri@yahoo.com.au
State New
Headers show

Commit Message

'Timothy Arceri' via Patchwork Forward Dec. 24, 2014, 6:12 a.m.
From: Timothy Arceri <t.arceri@bom.gov.au>

dont assign values to shader inputs
---
 I didn't realise my mistake as Mesa currently allows
 inputs to change. I'm working on some Mesa fixes for
 this.

 .../intrastage-unsized-interface-array-mismatch.shader_test | 12 +++++-------
 ...intrastage-unsized-interface-array-mismatch2.shader_test | 13 +++++--------
 .../linker/intrastage-unsized-interface-array.shader_test   | 12 +++++-------
 .../linker/intrastage-unsized-interface-array2.shader_test  | 13 +++++--------
 4 files changed, 20 insertions(+), 30 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
index 9e373a2..7072659 100644
--- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
@@ -14,6 +14,7 @@  out ArrayInterfaceBlock
 
 void main()
 {
+  i.a = vec4(1.0);
   gl_Position = vec4(1.0);
 }
 
@@ -28,9 +29,9 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[4];
 
-void f()
+vec4 f()
 {
-  i[1].a = vec4(1, 0, 0, 1);
+  return i[1].a;
 }
 
 [geometry shader]
@@ -41,14 +42,11 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[];
 
-void f();
+vec4 f();
 
 void main()
 {
-  f();
-  i[4].a = vec4(1, 0, 0, 1);
-
-  gl_Position = i[3].a;
+  gl_Position = i[4].a + f();
 }
 
 [test]
diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
index d661795..e7f1195 100644
--- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
@@ -14,6 +14,7 @@  out ArrayInterfaceBlock
 
 void main()
 {
+  i.a = vec4(1.0);
   gl_Position = vec4(1.0);
 }
 
@@ -25,15 +26,14 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[];
 
-void f()
+vec4 f()
 {
-  i[4].a = vec4(1, 0, 0, 1);
+  return i[4].a;
 }
 
 [geometry shader]
 #version 150
 
-
 layout(lines_adjacency) in;
 layout(triangle_strip, max_vertices = 3) out;
 
@@ -42,14 +42,11 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[4];
 
-void f();
+vec4 f();
 
 void main()
 {
-  f();
-  i[3].a = vec4(1, 0, 0, 1);
-
-  gl_Position = i[3].a;
+  gl_Position = i[3].a + f();
 }
 
 [test]
diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
index 1dfae4f..06430c2 100644
--- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
@@ -14,6 +14,7 @@  out ArrayInterfaceBlock
 
 void main()
 {
+  i.a = vec4(1.0);
   gl_Position = vec4(1.0);
 }
 
@@ -28,9 +29,9 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[4];
 
-void f()
+vec4 f()
 {
-  i[1].a = vec4(1, 0, 0, 1);
+  return i[1].a;
 }
 
 [geometry shader]
@@ -41,14 +42,11 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[];
 
-void f();
+vec4 f();
 
 void main()
 {
-  f();
-  i[3].a = vec4(1, 0, 0, 1);
-
-  gl_Position = i[3].a;
+  gl_Position = i[3].a + f();
 }
 
 [test]
diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
index 1ad5b08..1ddc975 100644
--- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
@@ -14,6 +14,7 @@  out ArrayInterfaceBlock
 
 void main()
 {
+  i.a = vec4(1.0);
   gl_Position = vec4(1.0);
 }
 
@@ -25,15 +26,14 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[];
 
-void f()
+vec4 f()
 {
-  i[3].a = vec4(1, 0, 0, 1);
+  return i[3].a;
 }
 
 [geometry shader]
 #version 150
 
-
 layout(lines_adjacency) in;
 layout(triangle_strip, max_vertices = 3) out;
 
@@ -42,14 +42,11 @@  in ArrayInterfaceBlock
   vec4 a;
 } i[4];
 
-void f();
+vec4 f();
 
 void main()
 {
-  f();
-  i[3].a = vec4(1, 0, 0, 1);
-
-  gl_Position = i[3].a;
+  gl_Position = i[3].a + f();
 }
 
 [test]