[Piglit] [PATCH 4/6] gs: Test geometry shader that doesn't generate any primitives.

Paul Berry stereotype441 at gmail.com
Sat Jul 27 06:10:05 PDT 2013


This test is parallel to the equivalently-named test in
tests/spec/arb_geometry_shader4, except that it verifies correct
behaviour in GLSL 1.50 geometry shaders rather than
ARB_geometry_shader4 geometry shaders.
---
 .../geometry/generate-zero-primitives.shader_test  | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test

diff --git a/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test b/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test
new file mode 100644
index 0000000..94aadb1
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/geometry/generate-zero-primitives.shader_test
@@ -0,0 +1,44 @@
+[require]
+GL >= 3.2
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+in vec4 vertex;
+
+void main()
+{
+	gl_Position = vertex;
+}
+
+[geometry shader]
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+void main()
+{
+}
+
+[fragment shader]
+#version 150
+
+void main()
+{
+	gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+ 1.0  1.0
+-1.0  1.0
+
+[test]
+clear color 0 0 0 0
+clear
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgb 0.0 0.0 0.0
-- 
1.8.3.4



More information about the Piglit mailing list