C Specification
Alternatively, to bind vertex buffers, along with their sizes and strides, to a command buffer for use in subsequent draw commands, call:
// Provided by VK_EXT_extended_dynamic_state
void vkCmdBindVertexBuffers2EXT(
VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets,
const VkDeviceSize* pSizes,
const VkDeviceSize* pStrides);
Parameters
-
commandBuffer
is the command buffer into which the command is recorded. -
firstBinding
is the index of the first vertex input binding whose state is updated by the command. -
bindingCount
is the number of vertex input bindings whose state is updated by the command. -
pBuffers
is a pointer to an array of buffer handles. -
pOffsets
is a pointer to an array of buffer offsets. -
pSizes
is an optional array of the size in bytes of vertex data bound frompBuffers
. -
pStrides
is optional, and when notNULL
is a pointer to an array of buffer strides.
Description
The values taken from elements i of pBuffers
and pOffsets
replace the current state for the vertex input binding
firstBinding
+ i, for i in [0,
bindingCount
).
The vertex input binding is updated to start at the offset indicated by
pOffsets
[i] from the start of the buffer pBuffers
[i].
If pSizes
is not NULL
then pSizes
[i] specifies the bound size
of the vertex buffer starting from the corresponding elements of
pBuffers
[i] plus pOffsets
[i].
All vertex input attributes that use each of these bindings will use these
updated addresses in their address calculations for subsequent draw
commands.
If the bound pipeline state object was created with the
VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT
dynamic state enabled
then pStrides
[i] specifies the distance in bytes between two
consecutive elements within the corresponding buffer.
In this case the VkVertexInputBindingDescription
::stride
state
from the pipeline state object is ignored.
See Also
VkBuffer, VkCommandBuffer, VkDeviceSize
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.