This test will add no extra tessellated triangles. It basically passes verticies through the tessellation stages and draws two triangles.
Signed-off-by: Jordan Justen <[email protected]> --- tests/all.py | 3 ++ .../execution/nop.shader_test | 63 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 tests/spec/arb_tessellation_shader/execution/nop.shader_test diff --git a/tests/all.py b/tests/all.py index 87d773c..87800d6 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3180,6 +3180,9 @@ spec['ARB_compute_shader']['built-in constants'] = concurrent_test('built-in-con arb_tessellation_shader = {} spec['ARB_tessellation_shader'] = arb_tessellation_shader arb_tessellation_shader['minmax'] = concurrent_test('arb_tessellation_shader-minmax') +add_shader_test_dir(spec['ARB_tessellation_shader'], + os.path.join(testsDir, 'spec', 'arb_tessellation_shader'), + recursive=True) import_glsl_parser_tests(spec['ARB_tessellation_shader'], os.path.join(testsDir, 'spec', 'arb_tessellation_shader'), ['compiler']) diff --git a/tests/spec/arb_tessellation_shader/execution/nop.shader_test b/tests/spec/arb_tessellation_shader/execution/nop.shader_test new file mode 100644 index 0000000..311c184 --- /dev/null +++ b/tests/spec/arb_tessellation_shader/execution/nop.shader_test @@ -0,0 +1,63 @@ +# Test a set of simple pass-through tessellation shaders + +[require] +GLSL >= 1.50 +GL_ARB_tessellation_shader + +#[vertex shader passthrough] + +[vertex shader] +#version 150 + +const vec2 verts[] = vec2[](vec2(-1, 1), + vec2(-1, -1), + vec2(1, -1), + vec2(1, 1)); +const int elts[] = int[](0, 1, 2, + 0, 2, 3); + +void main() +{ + gl_Position = vec4(verts[elts[gl_VertexID]], 0, 1); +} + +[tessellation control shader] +#version 150 +#extension GL_ARB_tessellation_shader : require + +layout(vertices = 3) 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_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position; +} + +[tessellation evaluation shader] +#version 150 +#extension GL_ARB_tessellation_shader : require + +layout(triangles, equal_spacing) in; + +void main() +{ + int index = int(gl_TessCoord.y + (2 * gl_TessCoord.z)); + gl_Position = gl_in[index].gl_Position; +} + +[fragment shader] +#version 150 + +void main() +{ + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); +} + +[test] +patch vertices 3 +draw arrays GL_PATCHES 0 6 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.0.0.rc4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
