[Piglit] [PATCH 02/10] arb_tessellation_shader: Add another minimal execution test

Marek Olšák maraeo at gmail.com
Mon Jul 27 17:02:31 PDT 2015


From: Chris Forbes <chrisf at ijw.co.nz>

v2: fixed by Marek

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 .../execution/patch-single-vert.shader_test        | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 tests/spec/arb_tessellation_shader/execution/patch-single-vert.shader_test

diff --git a/tests/spec/arb_tessellation_shader/execution/patch-single-vert.shader_test b/tests/spec/arb_tessellation_shader/execution/patch-single-vert.shader_test
new file mode 100644
index 0000000..3f779c1
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/execution/patch-single-vert.shader_test
@@ -0,0 +1,49 @@
+# Test a very simple set of tess shaders which
+# do not require per-vertex data.
+
+[require]
+GLSL >= 1.50
+GL_ARB_tessellation_shader
+
+[vertex shader passthrough]
+
+[tessellation control shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(vertices = 1) out;
+
+void main()
+{
+	gl_TessLevelInner[0] = 1.0;
+	gl_TessLevelInner[1] = 1.0;
+
+	gl_TessLevelOuter[0] = 1.0;
+	gl_TessLevelOuter[1] = 1.0;
+	gl_TessLevelOuter[2] = 1.0;
+	gl_TessLevelOuter[3] = 1.0;
+}
+
+[tessellation evaluation shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(quads, equal_spacing) in;
+
+void main()
+{
+	gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
+}
+
+[fragment shader]
+#version 150
+
+void main()
+{
+	gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
+patch parameter vertices 1
+draw arrays GL_PATCHES 0 1
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.1.4



More information about the Piglit mailing list