1 # Test that the correct set of invocations is dispatched
2 # for an even number of output vertices
6 GL_ARB_tessellation_shader
7 GL_ARB_shader_atomic_counters
9 [vertex shader passthrough]
11 [tessellation control shader]
13 #extension GL_ARB_tessellation_shader : require
14 #extension GL_ARB_shader_atomic_counters : require
16 layout(vertices = 4) out;
18 layout(binding=0) uniform atomic_uint x;
22 gl_TessLevelInner[0] = 1.0;
23 gl_TessLevelInner[1] = 1.0;
25 gl_TessLevelOuter[0] = 1.0;
26 gl_TessLevelOuter[1] = 1.0;
27 gl_TessLevelOuter[2] = 1.0;
28 gl_TessLevelOuter[3] = 1.0;
31 for (i=0; i<=gl_InvocationID; i++)
32 atomicCounterIncrement(x);
35 [tessellation evaluation shader]
37 #extension GL_ARB_tessellation_shader : require
39 layout(quads, equal_spacing) in;
43 gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
51 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
56 patch parameter vertices 1
57 draw arrays GL_PATCHES 0 1
59 probe atomic counter 0 == 10
60 probe all rgba 0.0 1.0 0.0 1.0