Function Prototype
vkFreeCommandBuffers
Free command buffers
To free command buffers, call:
void vkFreeCommandBuffers(
VkDevice device,
VkCommandPool commandPool,
uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers);
device
is the logical device that owns the command pool.commandPool
is the command pool from which the command buffers were allocated.commandBufferCount
is the length of thepCommandBuffers
array.pCommandBuffers
is 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
commandPool
must be externally synchronized - Host access to each member of
pCommandBuffers
must be externally synchronized ::