C Specification
To dynamically set the vertex input attribute and vertex input binding descriptions, call:
// Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state
void vkCmdSetVertexInputEXT(
VkCommandBuffer commandBuffer,
uint32_t vertexBindingDescriptionCount,
const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions,
uint32_t vertexAttributeDescriptionCount,
const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions);
Parameters
-
commandBuffer
is the command buffer into which the command will be recorded. -
vertexBindingDescriptionCount
is the number of vertex binding descriptions provided inpVertexBindingDescriptions
. -
pVertexBindingDescriptions
is a pointer to an array ofVkVertexInputBindingDescription2EXT
structures. -
vertexAttributeDescriptionCount
is the number of vertex attribute descriptions provided inpVertexAttributeDescriptions
. -
pVertexAttributeDescriptions
is a pointer to an array ofVkVertexInputAttributeDescription2EXT
structures.
Description
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.
Document Notes
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.