[Piglit] [PATCH 14/18] arb_geometry_shader4: Test mismatching varying arrays.

Fabian Bieler fabianbieler at fastmail.fm
Fri May 31 06:27:11 PDT 2013


Test that array sizes of user-defined varyings are cross-validated between
vertex and geometry shaders.
---
 .../linker/varying-mismatch.shader_test            | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 tests/spec/arb_geometry_shader4/linker/varying-mismatch.shader_test

diff --git a/tests/spec/arb_geometry_shader4/linker/varying-mismatch.shader_test b/tests/spec/arb_geometry_shader4/linker/varying-mismatch.shader_test
new file mode 100644
index 0000000..4010854
--- /dev/null
+++ b/tests/spec/arb_geometry_shader4/linker/varying-mismatch.shader_test
@@ -0,0 +1,40 @@
+[require]
+GL >= 2.0
+GLSL >= 1.10
+GL_ARB_geometry_shader4
+
+[vertex shader]
+#version 110
+
+varying float var[1];
+void main()
+{
+	var[0] = 0.0;
+	gl_Position = vec4(0);
+}
+
+[geometry shader]
+#version 110
+#extension GL_ARB_geometry_shader4: enable
+
+varying in float var[1][2];
+void main()
+{
+	gl_Position = vec4(0.0);
+}
+
+[geometry layout]
+input type GL_POINTS
+output type GL_POINTS
+vertices out 1
+
+[fragment shader]
+#version 110
+
+void main()
+{
+  gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
+link error
-- 
1.8.1.2



More information about the Piglit mailing list