VKRESETCOMMANDBUFFER(3)

NAME
vkResetCommandBuffer - Reset a command buffer

C SPECIFICATION

To reset command buffers, call:

    VkResult vkResetCommandBuffer(
        VkCommandBuffer                             commandBuffer,
        VkCommandBufferResetFlags                   flags);

PARAMETERS

    • commandBuffer is the command buffer to reset. The command buffer can be in any state, and is put in the initial state.

    • flags is a bitmask controlling the reset operation. Bits which can be set include:

        typedef enum VkCommandBufferResetFlagBits {
            VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
        } VkCommandBufferResetFlagBits;

    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.

DESCRIPTION
Valid Usage

    • 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
Valid Usage (Implicit)

    • commandBuffer must be a valid VkCommandBuffer handle

    • flags must be a valid combination of VkCommandBufferResetFlagBits values
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

VkCommandBuffer, VkCommandBufferResetFlags

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

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

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.