To record a non-indexed draw call with a draw call count sourced from a buffer, call:
void vkCmdDrawIndirectCountKHR( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
or the equivalent command
void vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride);
commandBufferis the command buffer into which the command is recorded.
bufferis the buffer containing draw parameters.
offsetis the byte offset into
bufferwhere parameters begin.
countBufferis the buffer containing the draw count.
countBufferOffsetis the byte offset into
countBufferwhere the draw count begins.
maxDrawCountspecifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in
strideis the byte stride between successive sets of draw parameters.
vkCmdDrawIndirectCountKHR behaves similarly to vkCmdDrawIndirect
except that the draw count is read by the device from a buffer during
The command will read an unsigned 32-bit integer from
countBufferOffset and use this as the draw count.
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.