4 // require_extensions: GL_ARB_tessellation_shader
11 * As a result, we choose a heavy-handed approach in which we only allow
12 * calls to barrier() inside main(). Even within main, barrier() calls are
13 * forbidden inside loops (even those that turn out to have constant loop
14 * counts and don't execute "break" or "continue" statements), if
15 * statements, or after a return statement.
17 * Further, from the spec text:
19 * In particular, barrier() may not be called inside
20 * a switch statement, in either sub-statement of an if statement, inside a
21 * do, for, or while loop, or at any point after a return statement in the
24 * Technically, we should disallow this usage of barrier() inside the always-taken
25 * default case -- but this is an interesting edge case for Mesa's compiler, which
26 * at this time does not express switch statements in the IR, and so an always-taken
27 * default case is indistinguishable from code outside the switch.
31 #extension GL_ARB_tessellation_shader: require
32 layout(vertices = 3) out;
36 gl_out[gl_InvocationID].gl_Position = vec4(0.0);
41 gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
42 gl_TessLevelInner = float[2](1.0, 1.0);