To record an indexed draw, call:
void vkCmdDrawIndexed( VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
commandBufferis the command buffer into which the command is recorded.
indexCountis the number of vertices to draw.
instanceCountis the number of instances to draw.
firstIndexis the base index within the index buffer.
vertexOffsetis the value added to the vertex index before indexing into the vertex buffer.
firstInstanceis the instance ID of the first instance to draw.
When the command is executed, primitives are assembled using the current
primitive topology and
indexCount vertices whose indices are retrieved
from the index buffer.
The index buffer is treated as an array of tightly packed unsigned integers
of size defined by the vkCmdBindIndexBuffer::
with which the buffer was bound.
The first vertex index is at an offset of
offset within the currently bound index buffer, where
is the offset specified by
the byte size of the type specified by
Subsequent index values are retrieved from consecutive locations in the
Indices are first compared to the primitive restart value, then zero
extended to 32 bits (if the
vertexOffset added to them, before being supplied as the
The primitives are drawn
instanceCount times with
firstInstance and increasing sequentially for each
The assembled primitives execute the currently bound graphics pipeline.
For more information, see the Vulkan Specification at URL
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.
Copyright (c) 2014-2017 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.