VKRESETCOMMANDBUFFER(3)

NAME
vkResetCommandBuffer - Reset a command buffer.

C SPECIFICATION

    VkResult vkResetCommandBuffer(
        VkCommandBuffer                             commandBuffer,
        VkCommandBufferResetFlags                   flags);

PARAMETERS

commandBuffer
    Command buffer to reset.

flags
    Flags controlling the behavior of the Reset operation. For more details, see VkCommandBufferResetFlags.

DESCRIPTION

vkResetCommandBuffer resets the command buffer specified in commandBuffer to a state where it can begin recording commands, i.e. it can be rebuilt by calling vkBeginCommandBuffer. Note that it is necessary to reset a command buffer which encountered an error during build before it can be reused.

If flags includes VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT, then most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • flags must be a valid combination of VkCommandBufferResetFlagBits values

    • commandBuffer must not currently be pending execution

    • commandBuffer must have been allocated from a pool that was created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

RETURN CODES

On success, this command returns

        • VK_SUCCESS

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

SEE ALSO

vkBeginCommandBuffer, vkEndCommandBuffer

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.