[Piglit] [PATCH] arb_arrays_of_arrays: test linking between vs and gs with explicit locations
Timothy Arceri
timothy.arceri at collabora.com
Thu Dec 17 16:39:03 PST 2015
---
.../linker/vs-to-gs-explicit-location.shader_test | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-explicit-location.shader_test
diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-explicit-location.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-explicit-location.shader_test
new file mode 100644
index 0000000..307f759
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-explicit-location.shader_test
@@ -0,0 +1,39 @@
+# Test for successful linking between vertex and geometry shaders
+
+[require]
+GLSL >= 1.50
+GL_ARB_arrays_of_arrays
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 150
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_separate_shader_objects: enable
+
+layout(location = 0) out vec4 vertex_to_gs[2][4];
+
+void main()
+{
+ vertex_to_gs[1][3] = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[geometry shader]
+#version 150
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_separate_shader_objects: enable
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+layout(location = 0) in vec4 vertex_to_gs[3][2][4];
+
+void main()
+{
+ for (int i = 0; i < 3; i++) {
+ gl_Position = vertex_to_gs[i][0][0];
+ EmitVertex();
+ }
+}
+
+[test]
+link success
--
2.4.3
More information about the Piglit
mailing list