Provided by: opengl-4-man-doc_1.0~svn31251-1build1_all bug

NAME

       barrier - synchronize execution of multiple shader invocations

DECLARATION

       void barrier(void);

DESCRIPTION

       Available only in the Tessellation Control and Compute Shaders, barrier provides a
       partially defined order of execution between shader invocations. For any given static
       instance of barrier, in a tessellation control shader, all invocations for a single input
       patch must enter it before any will be allowed to continue beyond it. For any given static
       instance of barrier in a compute shader, all invocations within a single work group must
       enter it before any are allowed to continue beyond it. This ensures that values written by
       one invocation prior to a given static instance of barrier can be safely read by other
       invocations after their call to the same static instance of barrier. Because invocations
       may execute in undefined order between these barrier calls, the values of a per-vertex or
       per-patch output variable, or any shared variable will be undefined in a number of cases.

       barrier may only be placed inside the function main() of the tessellation control shader,
       but may be placed anywhere in a compute shader. Calls to barrier may not be placed within
       any control flow. Barriers are also disallowed after a return statement in the function
       main().

VERSION SUPPORT

       ┌─────────┬───────────────────────────────────────────────────────────────────────────────────┐
       │         │        OpenGL Shading Language Version                                            │
       ├─────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │Name     │      │      │      │      │      │      │      │      │      │      │      │      │
       ├─────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │barrier  │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       └─────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

COPYRIGHT

       Copyright © 2011-2014 Khronos Group. This material may be distributed subject to the terms
       and conditions set forth in the Open Publication License, v 1.0, 8 June 1999.
       http://opencontent.org/openpub/.

COPYRIGHT

       Copyright © 2011-2014 Khronos Group

[FIXME: source]                             07/22/2015                                BARRIER(3G)