def barrier(name):
intrinsic(name)
-barrier("barrier")
barrier("discard")
# Demote fragment shader invocation to a helper invocation. Any stores to
barrier("demote")
intrinsic("is_helper_invocation", dest_comp=1, flags=[CAN_ELIMINATE])
+# A workgroup-level control barrier. Any thread which hits this barrier will
+# pause until all threads within the current workgroup have also hit the
+# barrier. For compute shaders, the workgroup is defined as the local group.
+# For tessellation control shaders, the workgroup is defined as the current
+# patch. This intrinsic does not imply any sort of memory barrier.
+barrier("control_barrier")
# Memory barrier with semantics analogous to the memoryBarrier() GLSL
# intrinsic.