1 # Test that TCS per-vertex outputs which are used only in
2 # TCS stage are not converted to local variables
3 # and indeed share data within the patch.
7 GL_ARB_tessellation_shader
8 GL_ARB_separate_shader_objects
9 GL_ARB_shader_atomic_counters
10 INT GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS >= 1
12 [vertex shader passthrough]
15 [tessellation control shader]
16 #extension GL_ARB_tessellation_shader: require
17 #extension GL_ARB_separate_shader_objects: require
18 #extension GL_ARB_shader_atomic_counters: require
19 layout(vertices = 3) out;
21 layout(location = 0) out vec4 out_unused_in_tes[];
23 layout(binding = 0) uniform atomic_uint mismatches;
27 out_unused_in_tes[gl_InvocationID] = gl_in[gl_InvocationID].gl_Position;
31 if (out_unused_in_tes[0] != gl_in[0].gl_Position ||
32 out_unused_in_tes[1] != gl_in[1].gl_Position ||
33 out_unused_in_tes[2] != gl_in[2].gl_Position) {
34 atomicCounterIncrement(mismatches);
39 [tessellation evaluation shader]
40 #extension GL_ARB_tessellation_shader: require
45 gl_Position = vec4(0);
53 gl_FragColor = vec4(1.0);
65 patch parameter vertices 3
66 draw arrays GL_PATCHES 0 3
68 probe atomic counter 0 == 0