C Specification
To bind strided address ranges as vertex buffers to a command buffer for use in subsequent drawing commands, call:
// Provided by VK_KHR_device_address_commands
void vkCmdBindVertexBuffers3KHR(
VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBindVertexBuffer3InfoKHR* pBindingInfos);
Parameters
-
commandBufferis the command buffer into which the command is recorded. -
firstBindingis the index of the first vertex input binding whose state is updated by the command. -
bindingCountis the number of vertex input bindings whose state is updated by the command. -
pInfosis a pointer to an array of VkBindVertexBuffer3InfoKHR structures defining address ranges to bind as vertex buffers.
Description
The values taken from the address ranges defined by elements i of
pInfos replace the current state for the vertex input binding
firstBinding + i, for i in [0,
bindingCount).
The vertex input binding is updated to the range of memory indicated by
pInfos[i].
All vertex input attributes that use each of these bindings will use these
updated addresses in their address calculations for subsequent drawing
commands.
If the nullDescriptor feature is enabled,
elements of pInfos can have a addressRange.size and
addressRange.address of 0.
If a vertex input attribute is bound to a vertex input binding with a
size and address of 0, the values taken from memory are
considered to be zero, and missing G, B, or A components are
filled with (0,0,1).
This command also dynamically sets the byte
strides between consecutive elements within the strided range defined by
pInfos[i] to the value of pInfos[i].addressRange.stride
when drawing using shader objects, or
when the graphics pipeline is created with
VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE set in
VkPipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, strides are specified by the
VkVertexInputBindingDescription::stride 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_EXT dynamic state enabled
then vkCmdSetVertexInputEXT can be used instead of
vkCmdBindVertexBuffers2 to set the stride.
|
Note
|
Unlike the static state to set the same, |
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.