vkResetCommandBuffer(3)

# vkResetCommandBuffer(3) Manual Page

## Name

vkResetCommandBuffer - Reset a command buffer to the initial state

## 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 other than pending, and is moved into the initial state.

- `flags` is a bitmask of VkCommandBufferResetFlagBits controlling the reset operation.

## Description

Any primary command buffer that is in the recording or executable state and has `commandBuffer` recorded into it, becomes invalid.

Valid Usage

- `commandBuffer` must not be in the pending state

- `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

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.