Function Prototype

vkResetCommandPool

Reset a command pool

To reset a command pool, call:

VkResult vkResetCommandPool(
    VkDevice device,
    VkCommandPool commandPool,
    VkCommandPoolResetFlags flags);
  • device is the logical device that owns the command pool.
  • commandPool is the command pool to reset.
  • flags is a bitmask of VkCommandPoolResetFlagBits controlling the reset operation.

Resetting a command pool recycles all of the resources from all of the command buffers allocated from the command pool back to the command pool. All command buffers that have been allocated from the command pool are put in the initial state.

Any primary command buffer allocated from another VkCommandPool that is in the recording or executable state and has a secondary command buffer allocated from commandPool recorded into it, becomes invalid.

Valid Usage

VUID-vkResetCommandPool-commandPool-00040

All VkCommandBuffer objects allocated from commandPool must not be in the pending state

Valid Usage (Implicit)

VUID-vkResetCommandPool-flags-parameter

flags must be a valid combination of VkCommandPoolResetFlagBits values

VUID-vkResetCommandPool-commandPool-parent

commandPool must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to commandPool must be externally synchronized ::