VKCMDFILLBUFFER(3)

NAME
vkCmdFillBuffer - Fill a region of a buffer with a fixed value.

C SPECIFICATION

    void vkCmdFillBuffer(
        VkCommandBuffer                             commandBuffer,
        VkBuffer                                    dstBuffer,
        VkDeviceSize                                dstOffset,
        VkDeviceSize                                size,
        uint32_t                                    data);

PARAMETERS

commandBuffer
    The command buffer upon which to execute the command.

dstBuffer
    The destination buffer.

dstOffset
    The offset in the buffer at which to begin filling.

size
    The size of the region to be filled, in bytes.

data
    The data with which to fill the buffer region.

DESCRIPTION

vkCmdFillBuffer fills a region of a buffer object with the fixed, 32-bit pattern specified in data. The command is executed in commandBuffer. dstBuffer specifies the destination buffer object, dstOffset specifies the offset within the buffer at which to begin filling and size specifies the size of the region to be filled, in bytes. dstOffset and size must be multiples of four bytes.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • dstBuffer must be a valid VkBuffer handle

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support 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

    • dstOffset must be less than the size of dstBuffer

    • dstOffset must be a multiple of 4

    • If size is not equal to VK_WHOLE_SIZE, size must be greater than 0

    • If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to the size of dstBuffer minus dstOffset

    • If size is not equal to VK_WHOLE_SIZE, size must be a multiple of 4

    • dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

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

SEE ALSO

vkCreateBuffer, vkCreateBufferView

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.