VKRESETCOMMANDPOOL(3)

NAME
vkResetCommandPool - Reset a command pool.

C SPECIFICATION

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

PARAMETERS

device
    The device the command pool was created from.

commandPool
    Command pool to reset.

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

DESCRIPTION

vkResetCommandPool resets the command pool specified in commandPool to a state that depends on the flags. If flags includes VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT, then the pool’s memory is returned to the system. If VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT is not used, then the pool’s memory is return to an "unallocated" state which command buffers can allocate from.

Resetting a pool implicitly resets all command buffers that were created from it, where resetting the command buffers is treated as if VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT were used.

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

    • Each of device and commandPool must have been created, allocated or retrieved from the same VkPhysicalDevice

    • 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

vkCreateCommandPool, vkDestroyCommandPool

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.