VKCMDBINDVERTEXBUFFE(3)

NAME
vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer

C SPECIFICATION

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

PARAMETERS

commandBuffer
    The first parameter.

startBinding
    The index of the first vertex buffer binding to which to bind a vertex buffer.

bindingCount
    The number of consecutive vertex buffer bindings to update.

pBuffers
    A pointer to an array of VkBuffer handles representing the buffers to be bound.

pOffsets
    A pointer to an array of VkDeviceSize values containing the offsets, in bytes, of each binding within its respective buffer.

DESCRIPTION

vkCmdBindVertexBuffers binds one or more vertex buffers to the command buffer specified by commandBuffer. The first binding to update is specified in startBinding and the number of bindings to update is specified in bindingCount.

pBuffers points to an array of bindingCount buffer object handles representing the buffers to bind. The same buffer may be referenced multiple times. pOffsets points to an array of bindingCount values containing the offsets, in bytes of the start of each binding within the current buffer.

Vertex data consumed by drawing commands such as vkCmdDraw or vkCmdDrawIndexed subsequently issued in commandBuffer is drawn from the buffers bound to that command buffer.

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

    • Each 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

vkCmdBindIndexBuffer, vkCmdDraw, vkCmdDrawIndexed, vkCmdDrawIndirect, vkCmdDrawIndexedIndirect

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.