vkBindBufferMemory2
To attach memory to buffer objects for one or more buffers at a time, call:
VkResult vkBindBufferMemory2KHR(
VkDevice device,
uint32_t bindInfoCount,
const VkBindBufferMemoryInfo* pBindInfos);
deviceis the logical device that owns the buffers and memory.bindInfoCountis the number of elements inpBindInfos.pBindInfosis a pointer to an array ofbindInfoCount
VkBindBufferMemoryInfo structures describing buffers and memory to bind.
On some implementations, it may be more efficient to batch memory bindings into a single command.
If the maintenance6 feature is enabled,
this command must attempt to perform all of the memory binding operations
described by pBindInfos, and must not early exit on the first
failure.
If any of the memory binding operations described by pBindInfos fail,
the VkResult returned by this command must be the return value of any
one of the memory binding operations which did not return VK_SUCCESS.
If the vkBindBufferMemory2 command failed,
VkBindMemoryStatus structures were not included in the pNext
chains of each element of pBindInfos,
and bindInfoCount was greater than one, then the buffers referenced by
pBindInfos will be in an indeterminate state, and must not be used.
Applications should destroy these buffers.
Valid Usage (Implicit)
VUID-vkBindBufferMemory2-device-parameter
device must be a valid VkDevice handle
VUID-vkBindBufferMemory2-pBindInfos-parameter
pBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindBufferMemoryInfo structures
VUID-vkBindBufferMemory2-bindInfoCount-arraylength
bindInfoCount must be greater than 0