VKCMDUPDATEBUFFER(3)

NAME
vkCmdUpdateBuffer - Update a buffer's contents from host memory.

C SPECIFICATION

    void vkCmdUpdateBuffer(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        VkDeviceSize                                dataSize,
        const uint32_t*                             pData);

PARAMETERS

commandBuffer
    The command buffer into which the command is to be placed.

dstBuffer
    The destination buffer.

dstOffset
    The offset within dstBuffer where the data is to be placed.

dataSize
    The size, in bytes of the data to be tranferred into the buffer.

pData
    A pointer to the data to be transferred into the buffer.

DESCRIPTION

vkCmdUpdateBuffer updates the content of the buffer object specified in dstBuffer with the dataSize bytes of host memory sourced from pData. The data is placed at the offset specified by dstOffset into the buffer object.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • dstBuffer must be a valid VkBuffer handle

    • pData must be a pointer to an array of [ $dataSize uint32_t values

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support transfer, graphics or compute operations

    • This command must only be called outside of a render pass instance

    • Each of commandBuffer and dstBuffer must have been created, allocated or retrieved from the same VkDevice

    • dataSize must be greater than 0

    • dstOffset must be less than the size of dstBuffer

    • dataSize must be less than or equal to the size of dstBuffer minus dstOffset

    • dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag

    • dstOffset must be a multiple of 4

    • dataSize must be less than or equal to 65536

    • dataSize must be a multiple of 4

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

COMMAND PROPERTIES
Command Buffer Levels | Render Pass Scope | Supported Queue Types
Primary Secondary | Outside | TRANSFER GRAPHICS COMPUTE

SEE ALSO

vkCmdCopyBuffer

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.