vkDestroyCommandPool(3)
C Specification
To destroy a command pool, call:
// Provided by VK_VERSION_1_0void vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator);Parameters
deviceis the logical device that destroys the command pool.commandPoolis the handle of the command pool to destroy.pAllocatorcontrols host memory allocation as described in theMemory Allocation chapter.
Description
When a pool is destroyed, all command buffers allocated from the pool arefreed.
Any primary command buffer allocated from anotherVkCommandPool thatis in therecording or executable state andhas a secondary command buffer allocated fromcommandPool recordedinto it, becomesinvalid.
VUID-vkDestroyCommandPool-commandPool-00041
AllVkCommandBufferobjects allocated fromcommandPoolmustnot be in thepending stateVUID-vkDestroyCommandPool-commandPool-00042
IfVkAllocationCallbackswere provided whencommandPoolwascreated, a compatible set of callbacksmust be provided hereVUID-vkDestroyCommandPool-commandPool-00043
If noVkAllocationCallbackswere provided whencommandPoolwas created,pAllocatormust beNULL
VUID-vkDestroyCommandPool-device-parameter
devicemust be a validVkDevice handleVUID-vkDestroyCommandPool-commandPool-parameter
IfcommandPoolis notVK_NULL_HANDLE,commandPoolmust be a validVkCommandPool handleVUID-vkDestroyCommandPool-pAllocator-parameter
IfpAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacks structureVUID-vkDestroyCommandPool-commandPool-parent
IfcommandPoolis a valid handle, itmust have been created, allocated, or retrieved fromdevice
Host access to
commandPoolmust be externally synchronized
Document Notes
For more information, see theVulkan Specification.
This page is extracted from the Vulkan Specification.Fixes and changes should be made to the Specification, not directly.