[Piglit] [PATCH 04/10] arb_tessellation_shader: Add yet another fairly minimal case

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


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

This variant has a pair of (attributeless) output control points,
which is the very simplest case for i965's SIMD4x2 dispatch of the
control shader. This test passing but patch-single-vert failing
indicates a problem with the 'last unpaired invocation' logic.

v2: fixed by Marek

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 .../execution/patch-pair-verts.shader_test         | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 tests/spec/arb_tessellation_shader/execution/patch-pair-verts.shader_test

diff --git a/tests/spec/arb_tessellation_shader/execution/patch-pair-verts.shader_test b/tests/spec/arb_tessellation_shader/execution/patch-pair-verts.shader_test
new file mode 100644
index 0000000..54d4fa9
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/execution/patch-pair-verts.shader_test
@@ -0,0 +1,50 @@
+# Test a very simple set of tess shaders which
+# do not require per-vertex data. We have a pair
+# of invocations, which is the easiest case for i965.
+
+[require]
+GLSL >= 1.50
+GL_ARB_tessellation_shader
+
+[vertex shader passthrough]
+
+[tessellation control shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(vertices = 2) 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