vkCmdDispatchIndirect
vkCmdDispatchIndirect is a Vulkan command used to execute a compute shader based on parameters stored in a buffer. Instead of providing the dispatch group counts directly in the command, these counts are read from a VkBuffer. This allows for dynamic dispatch, where the number of workgroups to launch is determined at runtime by previous compute operations or other GPU-side logic.
The command takes a pipeline bind point (always VK_PIPELINE_BIND_POINT_COMPUTE), a compute pipeline handle, and a VkBuffer
Using vkCmdDispatchIndirect is beneficial when the workload size is not known at the time of command buffer