Function vk_mem_alloc::ffi::vmaCreateAliasingBuffer
source · [−]pub unsafe extern "C" fn vmaCreateAliasingBuffer(
allocator: VmaAllocator,
allocation: VmaAllocation,
pBufferCreateInfo: *const BufferCreateInfo,
pBuffer: *mut Buffer
) -> Result
Expand description
\brief Creates a new VkBuffer
, binds already created memory for it.
\param allocator \param allocation Allocation that provides memory to be used for binding new buffer to it. \param pBufferCreateInfo \param[out] pBuffer Buffer that was created.
This function automatically:
-# Creates buffer. -# Binds the buffer with the supplied memory.
If any of these operations fail, buffer is not created,
returned value is negative error code and *pBuffer
is null.
If the function succeeded, you must destroy the buffer when you
no longer need it using vkDestroyBuffer()
. If you want to also destroy the corresponding
allocation you can use convenience function vmaDestroyBuffer().