GL_LOCALINVOCATIONIN(3G)

πŸ’– NAME πŸ’–

okay bestie, welcome to the manual page with header title GL_LOCALINVOCATIONIN(3G) and manual-name slot [FIXME: manual] β€” this is all about gl_LocalInvocationIndex, and she is literally the local linear index of the work item your compute shader is currently operating on. iconic. ✨

gl_LocalInvocationIndex β€” contains the local linear index of work item currently being operated on by a compute shader. (name-line vibe preserved fr fr.)

πŸ› οΈ DECLARATION πŸ› οΈ

the raw declaration line on this page is:

in uint gl_LocalInvocationIndex ;.SH "DESCRIPTION"

yes, the .SH "DESCRIPTION" bit is attached in the original β€” it's just the manpage macro gremlin doing its thing πŸ’€

✨ DESCRIPTION ✨

so in the compute language, gl_LocalInvocationIndex is a derived input variable. she contains the 1-dimensional linearized index of the work invocation within the work group that the current shader is executing on. no cap.

the value of gl_LocalInvocationIndex is equal to:

gl_LocalInvocationID.z * gl_WorkGroupSize.x * gl_WorkGroupSize.y + gl_LocalInvocationID.y * gl_WorkGroupSize.x + gl_LocalInvocationID.x

iykyk β€” that formula is the whole moment. πŸ¦‹

πŸ‘‘ VERSION SUPPORT πŸ‘‘

the table header says OpenGL Shading Language Version, and the row label is Variable Name: gl_LocalInvocationIndex.

here's the version vibe check, preserving every column:

  • 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 page marks 4.40 and 4.50 with βœ”, and everything from 1.10 through 4.30 with -. periodt. 🌸

🫢 SEE ALSO 🫢

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

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


okay that's the whole page, mwah πŸ’‹. xoxo, your girl signing off β€” source/version: [FIXME: source], date: 08/09/2021, and the title up top is GL_LOCALINVOCATIONIN(3G). stay slay and keep those work group indices linearized πŸ’…βœ¨

πŸ“¦ where this page comes from