Function vk_mem_alloc::ffi::vmaAllocateMemoryForBuffer
source · [−]pub unsafe extern "C" fn vmaAllocateMemoryForBuffer(
allocator: VmaAllocator,
buffer: Buffer,
pCreateInfo: *const VmaAllocationCreateInfo,
pAllocation: *mut VmaAllocation,
pAllocationInfo: *mut VmaAllocationInfo
) -> Result
Expand description
\brief Allocates memory suitable for given VkBuffer
.
\param allocator \param buffer \param pCreateInfo \param[out] pAllocation Handle to allocated memory. \param[out] pAllocationInfo Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo().
It only creates #VmaAllocation. To bind the memory to the buffer, use vmaBindBufferMemory().
This is a special-purpose function. In most cases you should use vmaCreateBuffer().
You must free the allocation using vmaFreeMemory() when no longer needed.