[Piglit] [PATCH 09/18] arb_geometry_shader4: Link without vertex shader.

Fabian Bieler fabianbieler at fastmail.fm
Mon Jun 10 15:26:48 PDT 2013


Test that linking fails without vertex shader present.

ARB_geometry_shader4 spec 2.15.2:
"Linking will also fail if the program object contains objects to form a
geometry shader (see section 2.16), but no objects to form a vertex shader"
---
 .../linker/no-vertex-shader.shader_test            | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 tests/spec/arb_geometry_shader4/linker/no-vertex-shader.shader_test

diff --git a/tests/spec/arb_geometry_shader4/linker/no-vertex-shader.shader_test b/tests/spec/arb_geometry_shader4/linker/no-vertex-shader.shader_test
new file mode 100644
index 0000000..dd851bc
--- /dev/null
+++ b/tests/spec/arb_geometry_shader4/linker/no-vertex-shader.shader_test
@@ -0,0 +1,32 @@
+[require]
+GL >= 2.0
+GLSL >= 1.10
+GL_ARB_geometry_shader4
+
+[geometry shader]
+#version 110
+#extension GL_ARB_geometry_shader4: enable
+
+void main()
+{
+	for (int i = 0; i < 3; i++) {
+		gl_Position = gl_PositionIn[i];
+		EmitVertex();
+	}
+}
+
+[geometry layout]
+input type GL_TRIANGLES
+output type GL_TRIANGLE_STRIP
+vertices out 3
+
+[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