[Piglit] [PATCH] glsl-1.50: test implicitly sized arrays match explicitly sized arrays across the same stage

Timothy Arceri t_arceri at yahoo.com.au
Mon Dec 22 02:36:29 PST 2014


---
 ...ge-unsized-interface-array-mismatch.shader_test | 55 +++++++++++++++++++++
 ...e-unsized-interface-array-mismatch2.shader_test | 56 ++++++++++++++++++++++
 .../intrastage-unsized-interface-array.shader_test | 55 +++++++++++++++++++++
 ...intrastage-unsized-interface-array2.shader_test | 56 ++++++++++++++++++++++
 4 files changed, 222 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
 create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
 create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
 create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test

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
new file mode 100644
index 0000000..9e373a2
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
@@ -0,0 +1,55 @@
+# This test verifies that a link error is generated if implicitly sized
+# arrays dont match explicitly sized arrays across the same stage.
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+out ArrayInterfaceBlock
+{
+  vec4 a;
+} i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
+
+[geometry shader]
+#version 150
+
+layout(lines_adjacency) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[4];
+
+void f()
+{
+  i[1].a = vec4(1, 0, 0, 1);
+}
+
+[geometry shader]
+#version 150
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[];
+
+void f();
+
+void main()
+{
+  f();
+  i[4].a = vec4(1, 0, 0, 1);
+
+  gl_Position = i[3].a;
+}
+
+[test]
+link error
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
new file mode 100644
index 0000000..d661795
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
@@ -0,0 +1,56 @@
+# This test verifies that a link error is generated if implicitly sized
+# arrays dont match explicitly sized arrays across the same stage.
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+out ArrayInterfaceBlock
+{
+  vec4 a;
+} i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
+
+[geometry shader]
+#version 150
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[];
+
+void f()
+{
+  i[4].a = vec4(1, 0, 0, 1);
+}
+
+[geometry shader]
+#version 150
+
+
+layout(lines_adjacency) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[4];
+
+void f();
+
+void main()
+{
+  f();
+  i[3].a = vec4(1, 0, 0, 1);
+
+  gl_Position = i[3].a;
+}
+
+[test]
+link error
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
new file mode 100644
index 0000000..1dfae4f
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
@@ -0,0 +1,55 @@
+# Test implicitly sized arrays match explicitly sized arrays
+# across the same stage.
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+out ArrayInterfaceBlock
+{
+  vec4 a;
+} i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
+
+[geometry shader]
+#version 150
+
+layout(lines_adjacency) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[4];
+
+void f()
+{
+  i[1].a = vec4(1, 0, 0, 1);
+}
+
+[geometry shader]
+#version 150
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[];
+
+void f();
+
+void main()
+{
+  f();
+  i[3].a = vec4(1, 0, 0, 1);
+
+  gl_Position = i[3].a;
+}
+
+[test]
+link success
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
new file mode 100644
index 0000000..1ad5b08
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
@@ -0,0 +1,56 @@
+# Test implicitly sized arrays match explicitly sized arrays
+# across the same stage.
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+out ArrayInterfaceBlock
+{
+  vec4 a;
+} i;
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}
+
+[geometry shader]
+#version 150
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[];
+
+void f()
+{
+  i[3].a = vec4(1, 0, 0, 1);
+}
+
+[geometry shader]
+#version 150
+
+
+layout(lines_adjacency) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in ArrayInterfaceBlock
+{
+  vec4 a;
+} i[4];
+
+void f();
+
+void main()
+{
+  f();
+  i[3].a = vec4(1, 0, 0, 1);
+
+  gl_Position = i[3].a;
+}
+
+[test]
+link success
-- 
2.1.0



More information about the Piglit mailing list