VKCMDBINDVERTEXBUFFE(3)

NAME
vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer

C SPECIFICATION

To bind vertex buffers to a command buffer for use in subsequent draw commands, call:

    void vkCmdBindVertexBuffers(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstBinding,
        uint32_t                                    bindingCount,
        const VkBuffer*                             pBuffers,
        const VkDeviceSize*                         pOffsets);

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.

DESCRIPTION

The values taken from elements [ $i$ ] of pBuffers and pOffsets replace the current state for the vertex input binding [ $thit{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]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent draw commands.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • pBuffers must be a pointer to an array of bindingCount valid VkBuffer handles

    • pOffsets must be a pointer to an array of bindingCount VkDeviceSize values

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support graphics operations

    • bindingCount must be greater than 0

    • Both of commandBuffer, and the elements of pBuffers must have been created, allocated, or retrieved from the same VkDevice

    • firstBinding must be less than VkPhysicalDeviceLimits::maxVertexInputBindings

    • The sum of firstBinding and bindingCount must be less than or equal to VkPhysicalDeviceLimits::maxVertexInputBindings

    • All elements of pOffsets must be less than the size of the corresponding element in pBuffers

    • All elements of pBuffers must have been created with the VK_BUFFER_USAGE_VERTEX_BUFFER_BIT flag

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

COMMAND PROPERTIES
Command Buffer Levels | Render Pass Scope | Supported Queue Types
Primary Secondary | Both | GRAPHICS

SEE ALSO

VkBuffer, VkCommandBuffer, VkDeviceSize

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkCmdBindVertexBuffers

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.