vkCmdSetVertexInputEXT
To dynamically set the vertex input attribute and vertex input binding descriptions, call:
void vkCmdSetVertexInputEXT(
VkCommandBuffer commandBuffer,
uint32_t vertexBindingDescriptionCount,
const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions,
uint32_t vertexAttributeDescriptionCount,
const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions);
commandBufferis the command buffer into which the command will be recorded.vertexBindingDescriptionCountis the number of vertex binding descriptions provided inpVertexBindingDescriptions.pVertexBindingDescriptionsis a pointer to an array of VkVertexInputBindingDescription2EXT structures.vertexAttributeDescriptionCountis the number of vertex attribute descriptions provided inpVertexAttributeDescriptions.pVertexAttributeDescriptionsis a pointer to an array of VkVertexInputAttributeDescription2EXT structures.
This command sets the vertex input attribute and vertex input binding
descriptions state for subsequent drawing commands
when drawing using shader objects, or
when the graphics pipeline is created with
VK_DYNAMIC_STATE_VERTEX_INPUT_EXT set in
VkPipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, this state is specified by the
VkGraphicsPipelineCreateInfo::pVertexInputState values used to
create the currently active pipeline.
If
drawing using shader objects,
or if
the bound pipeline state object was also created with the
VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled,
then vkCmdBindVertexBuffers2 can be used instead of
vkCmdSetVertexInputEXT to dynamically set the stride.
The vertex attribute description for any location in the range
[0,VkPhysicalDeviceLimits::maxVertexInputAttributes) not
specified in the pVertexAttributeDescriptions array becomes
undefined:.
Valid Usage
VUID-vkCmdSetVertexInputEXT-None-08546
Either the vertexInputDynamicState feature or the shaderObject feature or both must be enabled
VUID-vkCmdSetVertexInputEXT-vertexBindingDescriptionCount-04791
vertexBindingDescriptionCount must be less than or equal to
VkPhysicalDeviceLimits::maxVertexInputBindings
VUID-vkCmdSetVertexInputEXT-vertexAttributeDescriptionCount-04792
vertexAttributeDescriptionCount must be less than or equal to
VkPhysicalDeviceLimits::maxVertexInputAttributes
VUID-vkCmdSetVertexInputEXT-binding-04793
For every binding specified by each element of
pVertexAttributeDescriptions, a
VkVertexInputBindingDescription2EXT must exist in
pVertexBindingDescriptions with the same value of binding
VUID-vkCmdSetVertexInputEXT-pVertexBindingDescriptions-04794
All elements of pVertexBindingDescriptions must describe distinct
binding numbers
VUID-vkCmdSetVertexInputEXT-pVertexAttributeDescriptions-04795
All elements of pVertexAttributeDescriptions must describe
distinct attribute locations
Valid Usage (Implicit)
VUID-vkCmdSetVertexInputEXT-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdSetVertexInputEXT-pVertexBindingDescriptions-parameter
If vertexBindingDescriptionCount is not 0, pVertexBindingDescriptions must be a valid pointer to an array of vertexBindingDescriptionCount valid VkVertexInputBindingDescription2EXT structures
VUID-vkCmdSetVertexInputEXT-pVertexAttributeDescriptions-parameter
If vertexAttributeDescriptionCount is not 0, pVertexAttributeDescriptions must be a valid pointer to an array of vertexAttributeDescriptionCount valid VkVertexInputAttributeDescription2EXT structures
VUID-vkCmdSetVertexInputEXT-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdSetVertexInputEXT-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support graphics operations
VUID-vkCmdSetVertexInputEXT-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized ::