GLDISPATCHCOMPUTEIND(3G)
β¨ NAME β¨
hey bestie, welcome to GLDISPATCHCOMPUTEIND(3G) β yes, that's the 3G manual, and the header's manual field is literally [FIXME: manual]. okay so glDispatchComputeIndirect β launch one or more compute work groups using parameters stored in a buffer. periodt.
π C SPECIFICATION π
void glDispatchComputeIndirect(GLintptr indirect);
π PARAMETERS π
indirectβ the offset into the buffer object currently bound to theGL_DISPATCH_INDIRECT_BUFFERbuffer target at which the dispatch parameters are stored.
π DESCRIPTION π
glDispatchComputeIndirect launches one or more compute work groups using parameters stored in the buffer object currently bound to the GL_DISPATCH_INDIRECT_BUFFER target. Each work group is processed by the active program object for the compute shader stage. The individual shader invocations inside a work group are executed as a unit, but the work groups themselves are executed completely independently and in unspecified order β chaotic but valid, iykyk.
indirect contains the offset into the data store of the buffer object bound to the GL_DISPATCH_INDIRECT_BUFFER target at which those parameters are stored.
The parameters addressed by indirect are packed as a structure that takes this form in C:
typedef struct {
uint num_groups_x;
uint num_groups_y;
uint num_groups_z;
} DispatchIndirectCommand;
A call to glDispatchComputeIndirect is equivalent, assuming no errors are generated, to:
cmd = (const DispatchIndirectCommand *)indirect;
glDispatchComputeIndirect(cmd->num_groups_x, cmd->num_groups_y, cmd->num_groups_z);
π¨ UnlikeglDispatchCompute(), no error is generated if any of thenum_groups_x,num_groups_yornum_groups_zmembers of theDispatchIndirectCommandis larger than the value ofGL_MAX_COMPUTE_WORK_GROUP_COUNTfor the corresponding dimension. In such circumstances, behavior is undefined and may lead to application termination. not a drill, bestie.
π ERRORS π
GL_INVALID_OPERATIONis generated if there is no active program for the compute shader stage.GL_INVALID_VALUEis generated ifindirectis less than zero or not a multiple of four.GL_INVALID_OPERATIONis generated if no buffer is bound to theGL_DISPATCH_INDIRECT_BUFFERtarget or if the command would source data beyond the end of the buffer object's data store.
π ASSOCIATED GETS π
glGet() with argument GL_MAX_COMPUTE_WORK_GROUP_COUNT.
π VERSION SUPPORT π
the table's Function / Feature Name row is glDispatchComputeIndirect, and the OpenGL Version columns line up like this:
2.0β-2.1β-3.0β-3.1β-3.2β-3.3β-4.0β-4.1β-4.2β-4.3ββ4.4ββ4.5ββ
π SEE ALSO π
glDispatchCompute().
π COPYRIGHT π
Copyright Β© 2013-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, bestie)
Copyright Β© 2013-2014 Khronos Group
okay bye bestie π«Ά β source/version field: [FIXME: source] Β· date: 08/09/2021 Β· footer title: GLDISPATCHCOMPUTEIND(3G). slay.
π¦ 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