[Piglit] [PATCH] arb_separate_shader_objects: test for explicit varying location overlap by AoA

Timothy Arceri timothy.arceri at collabora.com
Tue Dec 15 21:20:39 PST 2015


Test results:
Nvidia GeForce 840M - NVIDIA 352.41: pass
Mesa 11.2 (dev): fail
---
 ...t-location-overlap-arrays-of-arrays.shader_test | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap-arrays-of-arrays.shader_test

diff --git a/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap-arrays-of-arrays.shader_test b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap-arrays-of-arrays.shader_test
new file mode 100644
index 0000000..996a118
--- /dev/null
+++ b/tests/spec/arb_separate_shader_objects/linker/vs-to-fs-explicit-location-overlap-arrays-of-arrays.shader_test
@@ -0,0 +1,55 @@
+// Test for explicit varying location overlap by arrays of arrays
+
+[require]
+GLSL >= 1.40
+GL_ARB_separate_shader_objects
+GL_ARB_arrays_of_arrays
+
+[vertex shader]
+#version 140
+#extension GL_ARB_separate_shader_objects : require
+#extension GL_ARB_arrays_of_arrays : require
+
+in vec4 piglit_vertex;
+
+layout(location = 0) out vec4 out1[2][2];
+layout(location = 3) out vec4 out2;
+
+void main()
+{
+	gl_Position = piglit_vertex;
+	out1[0][0] = vec4(1.0, 0.0, 0.0, 1.0);
+	out1[0][1] = vec4(0.0, 1.0, 0.0, 1.0);
+	out1[1][0] = vec4(0.0, 0.0, 1.0, 1.0);
+	out1[1][1] = vec4(1.0, 1.0, 1.0, 1.0);
+	out2 = vec4(0.0);
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_separate_shader_objects : require
+#extension GL_ARB_arrays_of_arrays : require
+
+uniform int i;
+
+layout(location = 0) in vec4 out1[2][2];
+layout(location = 3) in vec4 out2;
+
+out vec4 color;
+
+void main()
+{
+	if (i == 0)
+		color = out1[0][0];
+	else if (i == 1)
+		color = out1[0][1];
+	else if (i == 2)
+		color = out1[1][0];
+	else if (i == 3)
+		color = out1[1][1];
+	else
+		color = out2;
+}
+
+[test]
+link error
-- 
2.4.3



More information about the Piglit mailing list