From d6cc00dcce1a723d9c4f0ad81f4ae4c4b36370fe Mon Sep 17 00:00:00 2001 From: James Legg Date: Sun, 13 Mar 2016 17:32:34 +0000 Subject: [PATCH] arb_tessellation_shader: Check single isolines can be created From the spec: "The number of isolines generated is derived from the first outer tessellation level; the number of segments in each isoline is derived from the second outer tessellation level." This demonstrates a bug on Intel Haswell, where the number of isolines is derived from the second outer tessellation level, and the number of segments from the first. --- .../execution/isoline.shader_test | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/spec/arb_tessellation_shader/execution/isoline.shader_test diff --git a/tests/spec/arb_tessellation_shader/execution/isoline.shader_test b/tests/spec/arb_tessellation_shader/execution/isoline.shader_test new file mode 100644 index 0000000..ef2fd9c --- /dev/null +++ b/tests/spec/arb_tessellation_shader/execution/isoline.shader_test @@ -0,0 +1,52 @@ +# Check producing a single tessellated isoline doesn't give multiple lines +[require] +GLSL >= 1.50 +GL_ARB_tessellation_shader + +[vertex shader] + +void main() +{ +} + + +[tessellation control shader] +#extension GL_ARB_tessellation_shader: require +layout(vertices = 2) out; + +void main() +{ + gl_TessLevelOuter[0] = 1.0; + gl_TessLevelOuter[1] = 4.0; +} + + +[tessellation evaluation shader] +#extension GL_ARB_tessellation_shader: require +layout(isolines, equal_spacing) in; +flat out int good; + +void main() +{ + gl_Position = vec4(gl_TessCoord.xy * 2.0 - 1.0, 0.0, 1.0); + good = int(gl_TessCoord.y == 0.0); +} + + +[fragment shader] +flat in int good; + +void main() +{ + if (bool(good)) + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); + else + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); +} + +[test] +clear color 0.0 1.0 0.0 1.0 +clear +patch parameter vertices 2 +draw arrays GL_PATCHES 0 2 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.5.0