VKRESETCOMMANDPOOL(3)

NAME
vkResetCommandPool - Reset a command pool.

C SPECIFICATION

To reset a command pool, call:

    VkResult vkResetCommandPool(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        VkCommandPoolResetFlags                     flags);

PARAMETERS

    • device is the logical device that owns the command pool.

    • commandPool is the command pool to reset.

    • flags contains additional flags controlling the behavior of the reset. Bits which can be set include:

        typedef enum VkCommandPoolResetFlagBits {
            VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001,
        } VkCommandPoolResetFlagBits;

    If flags includes VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT, resetting a command pool recycles all of the resources from the command pool back to the system.

DESCRIPTION

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.

VALID USAGE

    • device must be a valid VkDevice handle

    • commandPool must be a valid VkCommandPool handle

    • flags must be a valid combination of VkCommandPoolResetFlagBits values

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

    • All VkCommandBuffer objects allocated from commandPool must not currently be pending execution

HOST SYNCHRONIZATION

    • Host access to commandPool 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

VkCommandPool, VkCommandPoolResetFlags, VkDevice

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

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

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.