barrier — synchronize execution of multiple shader invocations
Available only in the Compute Shader,
a partially defined order of execution between shader invocations. 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
barrier can be safely read by other invocations after their call to the same static
barrier. Because invocations may execute in undefined order between these
barrier calls, the values of any shared variable will be undefined in a number of cases.
barrier may be placed anywhere in a compute shader, except within any control flow or
after a return statement in the function
|OpenGL ES Shading Language Version|
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. https://opencontent.org/openpub/.