You pass the
offset into the buffer to glDispatchComputeIndirect(). At the address that is computed with this offset, the GL expects 3, tighly packed uints. That's it.
What the GL does under the hood is effectively equivalent to:
Code :
typedef struct {
uint num_groups_x;
uint num_groups_y;
uint num_groups_z;
} DispatchIndirectCommand;
void glDispatchComputeIndirect(GLintptr indirect)
{
cmd = (const DispatchIndirectCommand *)(bufferBaseAddress + indirect);
glDispatchCompute(cmd->num_groups_x, cmd->num_groups_y, cmd->num_groups_z);
}
As long as you're not pointing to some invalid adress and as long as your parameter pack is valid, there shouldn't be any problems.