C Specification
To allocate command buffers, call:
// Provided by VK_VERSION_1_0
VkResult vkAllocateCommandBuffers(
VkDevice device,
const VkCommandBufferAllocateInfo* pAllocateInfo,
VkCommandBuffer* pCommandBuffers);
Parameters
-
device
is the logical device that owns the command pool. -
pAllocateInfo
is a pointer to a VkCommandBufferAllocateInfo structure describing parameters of the allocation. -
pCommandBuffers
is a pointer to an array of VkCommandBuffer handles in which the resulting command buffer objects are returned. The array must be at least the length specified by thecommandBufferCount
member ofpAllocateInfo
. Each allocated command buffer begins in the initial state.
Description
vkAllocateCommandBuffers
can be used to allocate multiple command
buffers.
If the allocation of any of those command buffers fails, the implementation
must free all successfully allocated command buffer objects from this
command, set all entries of the pCommandBuffers
array to NULL
and
return the error.
Note
Filling |
When command buffers are first allocated, they are in the initial state.
If
VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations
is VK_TRUE
, vkAllocateCommandBuffers
must not return
VK_ERROR_OUT_OF_HOST_MEMORY
.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.