GL_WORKGROUPID(3G)
π GL_WORKGROUPID π
okay bestie, so this is a page from the 3G manual section and it's literally all about gl_WorkGroupID β the little built-in that tells your compute shader which workgroup it's currently vibing in. let's get into it β¨
πΈ NAME πΈ
gl_WorkGroupID β contains the index of the workgroup currently being operated on by a compute shader π«Ά
π DECLARATION π
in uvec3 gl_WorkGroupID ;
(no cap, that's the whole decl β inside your shader, you just write gl_WorkGroupID and the compiler already knows her π
)
β¨ DESCRIPTION β¨
so, in the compute language, gl_WorkGroupID holds the 3-dimensional index of the global work group that the current compute shader invocation is executing within π¦ like, the bigger bucket your invocation lives in, iykyk.
the possible values range across the parameters you pass into glDispatchCompute, okay? so it goes from (0, 0, 0) all the way up to (gl_NumWorkGroups.x - 1, gl_NumWorkGroups.y - 1, gl_NumWorkGroups.z - 1). that's the whole range, bestie β no sneaky extras π
π₯ VERSION SUPPORT π₯
here's the vibe check on which GLSL versions support her β the original page lays this out in a big table, so let me translate it into something readable π
1.10β nope,-π1.20β nope,-π1.30β nope,-π1.40β nope,-π1.50β nope,-π3.30β nope,-π4.00β nope,-π4.10β nope,-π4.20β nope,-π4.30β YES,βπ4.40β YES,βπ4.50β YES,βπ
so the variable name row is gl_WorkGroupID and the OpenGL Shading Language Version columns are the ones above β she shows up starting at 4.30 and stays iconic through 4.50 π
π§ SEE ALSO π§
gl_NumWorkGroups()gl_WorkGroupID()gl_LocalInvocationID()
π 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 (the sequel) π
Copyright Β© 2012-2014 Khronos Group
and that's a wrap, bestie π«Ά this absolute icon of a page is sourced from [FIXME: source] and dated 08/09/2021 β go forth and dispatch those workgroups responsibly ππ
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms