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
11 [vertex shader passthrough]
14 [tessellation control shader]
15 #extension GL_ARB_tessellation_shader: require
16 #extension GL_ARB_separate_shader_objects: require
17 #extension GL_ARB_shader_atomic_counters: require
18 layout(vertices = 3) out;
20 layout(location = 0) out vec4 out_unused_in_tes[];
22 layout(binding = 0) uniform atomic_uint mismatches;
26 out_unused_in_tes[gl_InvocationID] = gl_in[gl_InvocationID].gl_Position;
30 if (out_unused_in_tes[0] != gl_in[0].gl_Position ||
31 out_unused_in_tes[1] != gl_in[1].gl_Position ||
32 out_unused_in_tes[2] != gl_in[2].gl_Position) {
33 atomicCounterIncrement(mismatches);
38 [tessellation evaluation shader]
39 #extension GL_ARB_tessellation_shader: require
44 gl_Position = vec4(0);
52 gl_FragColor = vec4(1.0);
64 patch parameter vertices 3
65 draw arrays GL_PATCHES 0 3
67 probe atomic counter 0 == 0