GL_GLOBALINVOCATIONI(3G)

πŸ’… NAME πŸ’…

okay bestie, welcome to the <pink>GL_GLOBALINVOCATIONI(3G)</pink> page β€” yes, that's the manual name, and we're diving in. This one is all about gl_GlobalInvocationID, which contains the global index of the work item currently being operated on by a compute shader. it's giving "where am I in the whole grid?" energy, and honestly? iconic.


🌸 DECLARATION 🌸

the declaration is literally this, bestie:

in uvec3 gl_GlobalInvocationID ;

✨ DESCRIPTION ✨

In the compute language, gl_GlobalInvocationID is a derived input variable that contains the n-dimensional index of the work invocation within the global work group that the current shader is executing on. no cap, that's the whole vibe.

The value of gl_GlobalInvocationID is equal to:

gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID

so yeah, it's literally the math doing its little main character thing πŸ’….


πŸ¦‹ VERSION SUPPORT πŸ¦‹

okay so the version support tea β˜•, presented without a table because we're cute like that:

  • Variable Name: gl_GlobalInvocationID
  • OpenGL Shading Language Version support check:
    • 1.10 β€” -
    • 1.20 β€” -
    • 1.30 β€” -
    • 1.40 β€” -
    • 1.50 β€” -
    • 3.30 β€” -
    • 4.00 β€” -
    • 4.10 β€” -
    • 4.20 β€” -
    • 4.30 β€” βœ”
    • 4.40 β€” βœ”
    • 4.50 β€” βœ”

so the listed values are - from 1.10 to 4.20, and βœ” at 4.30, 4.40, and 4.50. slay.


πŸŽ€ SEE ALSO πŸŽ€

  • gl_NumWorkGroups()
  • gl_WorkGroupID()
  • gl_WorkGroupSize()
  • gl_LocalInvocationID()

go read those too, bestie β€” iykyk 🫢


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 Β© 2012-2014 Khronos Group


made with πŸ’– by your Unix bestie Β· source/version: [FIXME: source] Β· date: 08/09/2021 Β· periodt πŸ’…

πŸ“¦ where this page comes from