cmdSetVertexInputEXT :: MonadIO io=> CommandBuffercommandBufferis the command buffer into which the command will be recorded.->"vertexBindingDescriptions"
::: Vector VertexInputBindingDescription2EXTpVertexBindingDescriptionsis a pointer to an array of VertexInputBindingDescription2EXT structures.->"vertexAttributeDescriptions"
::: Vector VertexInputAttributeDescription2EXTpVertexAttributeDescriptionsis a pointer to an array of VertexInputAttributeDescription2EXT structures.-> io ()
vkCmdSetVertexInputEXT - Set the vertex input state dynamically for a command buffer
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
DYNAMIC_STATE_VERTEX_INPUT_EXT set in
PipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, this state is specified by the
GraphicsPipelineCreateInfo::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 DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE dynamic state enabled, then cmdBindVertexBuffers2 can be used instead of cmdSetVertexInputEXT to dynamically set the stride.
The vertex attribute description for any location in the range
[0,PhysicalDeviceLimits::maxVertexInputAttributes)
not specified in the pVertexAttributeDescriptions array becomes
undefined.
Valid Usage
Either the vertexInputDynamicState feature or the shaderObject feature or both must be enabled
vertexBindingDescriptionCountmust be less than or equal to PhysicalDeviceLimits::maxVertexInputBindingsvertexAttributeDescriptionCountmust be less than or equal to PhysicalDeviceLimits::maxVertexInputAttributesFor every
bindingspecified by each element ofpVertexAttributeDescriptions, a VertexInputBindingDescription2EXT must exist inpVertexBindingDescriptionswith the same value ofbindingAll elements of
pVertexBindingDescriptionsmust describe distinct binding numbersAll elements of
pVertexAttributeDescriptionsmust describe distinct attribute locations
Valid Usage (Implicit)
commandBuffermust be a valid CommandBuffer handle
If
vertexBindingDescriptionCountis not0,pVertexBindingDescriptionsmust be a valid pointer to an array ofvertexBindingDescriptionCountvalid VertexInputBindingDescription2EXT structuresIf
vertexAttributeDescriptionCountis not0,pVertexAttributeDescriptionsmust be a valid pointer to an array ofvertexAttributeDescriptionCountvalid VertexInputAttributeDescription2EXT structurescommandBuffermust be in the recording stateThe CommandPool that
commandBufferwas allocated from must support QUEUE_GRAPHICS_BIT operationsThis command must only be called outside of a video coding scope
Host Synchronization
Host access to
commandBuffermust be externally synchronized
Host access to the CommandPool that
commandBufferwas allocated from must be externally synchronized
Command Properties
'
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State |
Conditional Rendering
vkCmdSetVertexInputEXT is not affected by conditional rendering
See Also
VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state, CommandBuffer, VertexInputAttributeDescription2EXT, VertexInputBindingDescription2EXT