BARRIER(3G)
okay bestie, welcome to BARRIER(3G) β the manual page for barrier π. the header is lowkey giving [FIXME: manual], but we're folding that in and moving on, no cap.
β¨ 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.
so yeah, if you're reading a shared variable and it's giving undefined, that's not a vibe, that's just the spec π
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 π
- Function Name:
barrier - OpenGL Shading Language Version:
1.10,1.20,1.30,1.40,1.50,3.30,4.00,4.10,4.20,4.30,4.40,4.50 barriersupport by version:1.10:-1.20:-1.30:-1.40:-1.50:-3.30:-4.00:β4.10:β4.20:β4.30:β4.40:β4.50:β
π 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
and that's the whole page, bestie! it came from [FIXME: source], dated 01/03/2018, and it's BARRIER(3G) β periodt π
β¨π¦
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms