[Piglit] [PATCH 3/3] GLSL 1.50: Test that linking fails if there is a geom shader without a vert shader
Nicholas Mack
nichmack at gmail.com
Fri Aug 23 15:13:12 PDT 2013
---
.../glsl-1.50/linker/gs-without-vs.shader_test | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
diff --git a/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test b/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
new file mode 100644
index 0000000..05c14dc
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/gs-without-vs.shader_test
@@ -0,0 +1,39 @@
+# Section 2.11.2 (Program Objects) of the GLSL 1.50 spec says:
+#
+# "Linking will also fail if the program object contains objects to form a
+# geometry shader (see section 2.12), and
+# • the program contains no objects to form a vertex shader;
+# • the input primitive type, output primitive type, or maximum output
+# vertex count is not specified in any compiled geometry shader object;
+# • the input primitive type, output primitive type, or maximum output
+# vertex count is specified differently in multiple geometry shader
+# objects."
+
+[require]
+GLSL >= 1.50
+
+[geometry shader]
+#version 150
+
+layout(triangles) in;
+layout(triangles, max_vertices = 3) out;
+
+in vec4 vertex[3];
+
+void main()
+{
+ gl_Position = vertex[0];
+ EmitVertex();
+}
+
+[fragment shader]
+#version 150
+
+out vec4 color;
+
+void main()
+{
+ color = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
--
1.8.3.1
More information about the Piglit
mailing list