barrier — synchronize execution of multiple shader invocations
void barrier(
void)
;
Available only in the Tessellation Control Shader, barrier
provides
a partially defined order of execution between shader invocations. For any given static instance of barrier
,
all tessellation control shader invocations for a single input patch must enter it before any will be 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 will be undefined
in a number of cases.
barrier
may only be placed inside the function main()
of the tessellation
control shader and may not be called within any control flow. Barriers are also disallowed after a return
statement in the function main()
.
Function | Version 1.10 | Version 1.20 | Version 1.30 | Version 1.40 | Version 1.50 | Version 3.30 | Version 4.00 | Version 4.10 | Version 4.20 | Version 4.30 |
---|---|---|---|---|---|---|---|---|---|---|
barrier | - | - | - | - | - | - | Y | Y | Y | Y |
Copyright © 2011 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/.