Function Prototype
vkFreeCommandBuffers
Free command buffers
To free command buffers, call:
void vkFreeCommandBuffers(
VkDevice device,
VkCommandPool commandPool,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers);
deviceis the logical device that owns the command pool.commandPoolis the command pool from which the command buffers were allocated.commandBufferCountis the length of thepCommandBuffersarray.pCommandBuffersis a pointer to an array of handles of command buffers to free.
Any primary command buffer that is in the recording or executable state and has any element of pCommandBuffers
recorded into it, becomes invalid.
Valid Usage
VUID-vkFreeCommandBuffers-pCommandBuffers-00047
All elements of pCommandBuffers must not be in the
pending state
VUID-vkFreeCommandBuffers-pCommandBuffers-00048
pCommandBuffers must be a valid pointer to an array of
commandBufferCount VkCommandBuffer handles, each element of
which must either be a valid handle or NULL
Valid Usage (Implicit)
VUID-vkFreeCommandBuffers-device-parameter
device must be a valid VkDevice handle
VUID-vkFreeCommandBuffers-commandPool-parameter
commandPool must be a valid VkCommandPool handle
VUID-vkFreeCommandBuffers-commandBufferCount-arraylength
commandBufferCount must be greater than 0
VUID-vkFreeCommandBuffers-commandPool-parent
commandPool must have been created, allocated, or retrieved from device
VUID-vkFreeCommandBuffers-pCommandBuffers-parent
Each element of pCommandBuffers that is a valid handle must have been created, allocated, or retrieved from commandPool
Host Synchronization
- Host access to
commandPoolmust be externally synchronized - Host access to each member of
pCommandBuffersmust be externally synchronized ::