summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2014-11-08 01:07:28 +1300
committerMarek Olšák <marek.olsak@amd.com>2015-07-29 21:43:48 +0200
commit582136df1d8b6554ec5e2a6e671db520c748d654 (patch)
tree00128a53f19d9eb60104e611ff64f4a2f8bdb7fe
parent45a867f1bb79fc650d082197781db0969c85c910 (diff)
arb_tessellation_shader: Add yet another fairly minimal case
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@ijw.co.nz> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--tests/spec/arb_tessellation_shader/execution/patch-pair-verts.shader_test50
1 files changed, 50 insertions, 0 deletions
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 000000000..54d4fa960
--- /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