fix the spelling in whole piglit
[piglit.git] / tests / spec / arb_tessellation_shader / execution / invocation-counting-odd.shader_test
blob69a6edacad64a2b72967e19a0989903c6fae2f14
1 # Test that the correct set of invocations is dispatched
2 # for an odd number of output vertices
4 [require]
5 GLSL >= 1.50
6 GL_ARB_tessellation_shader
7 GL_ARB_shader_atomic_counters
8 INT GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS >= 1
10 [vertex shader passthrough]
12 [tessellation control shader]
13 #version 150
14 #extension GL_ARB_tessellation_shader : require
15 #extension GL_ARB_shader_atomic_counters : require
17 layout(vertices = 3) out;
19 layout(binding=0) uniform atomic_uint x;
21 void main()
23         gl_TessLevelInner[0] = 1.0;
24         gl_TessLevelInner[1] = 1.0;
26         gl_TessLevelOuter[0] = 1.0;
27         gl_TessLevelOuter[1] = 1.0;
28         gl_TessLevelOuter[2] = 1.0;
29         gl_TessLevelOuter[3] = 1.0;
31         int i;
32         for (i=0; i<=gl_InvocationID; i++)
33                 atomicCounterIncrement(x);
36 [tessellation evaluation shader]
37 #version 150
38 #extension GL_ARB_tessellation_shader : require
40 layout(quads, equal_spacing) in;
42 void main()
44         gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
47 [fragment shader]
48 #version 150
50 void main()
52         gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
55 [test]
56 atomic counters 1
57 patch parameter vertices 1
58 draw arrays GL_PATCHES 0 1
60 probe atomic counter 0 == 6
61 probe all rgba 0.0 1.0 0.0 1.0