VkDrawIndirectCommand
The VkDrawIndirectCommand
structure is defined as:
typedef struct VkDrawIndirectCommand {
uint32_t vertexCount;
uint32_t instanceCount;
uint32_t firstVertex;
uint32_t firstInstance;
} VkDrawIndirectCommand;
vertexCount
is the number of vertices to draw.instanceCount
is the number of instances to draw.firstVertex
is the index of the first vertex to draw.firstInstance
is the instance ID of the first instance to draw.
The members of VkDrawIndirectCommand
have the same meaning as the
similarly named parameters of vkCmdDraw.
Valid Usage
VUID-VkDrawIndirectCommand-pNext-09461
If the bound graphics pipeline state was created with
VkPipelineVertexInputDivisorStateCreateInfoKHR in the pNext
chain of VkGraphicsPipelineCreateInfo::pVertexInputState
,
any member of
VkPipelineVertexInputDivisorStateCreateInfoKHR::pVertexBindingDivisors
has a value other than 1
in divisor
, and
VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR::supportsNonZeroFirstInstance
is VK_FALSE
, then firstInstance
must be 0
VUID-VkDrawIndirectCommand-None-09462
If
shader objects are used for drawing or
the bound graphics pipeline state was created with the
VK_DYNAMIC_STATE_VERTEX_INPUT_EXT
dynamic state enabled, any
member of the pVertexBindingDescriptions
parameter to the
vkCmdSetVertexInputEXT call that sets this dynamic state has a
value other than 1
in divisor
, and
VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR::supportsNonZeroFirstInstance
is VK_FALSE
, then firstInstance
must be 0
VUID-VkDrawIndirectCommand-firstInstance-00501
If the drawIndirectFirstInstance
feature is not enabled,
firstInstance
must be 0