Vulkan Memory Allocator
|
Functions | |
VkResult | vmaCreateBuffer (VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo) |
void | vmaDestroyBuffer (VmaAllocator allocator, VkBuffer buffer, VmaAllocation allocation) |
Destroys Vulkan buffer and frees allocated memory. More... | |
VkResult | vmaCreateImage (VmaAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkImage *pImage, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo) |
Function similar to vmaCreateBuffer(). More... | |
void | vmaDestroyImage (VmaAllocator allocator, VkImage image, VmaAllocation allocation) |
Destroys Vulkan image and frees allocated memory. More... | |
VkResult vmaCreateBuffer | ( | VmaAllocator | allocator, |
const VkBufferCreateInfo * | pBufferCreateInfo, | ||
const VmaAllocationCreateInfo * | pAllocationCreateInfo, | ||
VkBuffer * | pBuffer, | ||
VmaAllocation * | pAllocation, | ||
VmaAllocationInfo * | pAllocationInfo | ||
) |
[out] | pBuffer | Buffer that was created. |
[out] | pAllocation | Allocation that was created. |
[out] | pAllocationInfo | Optional. Information about allocated memory. It can be later fetched using function vmaGetAllocationInfo(). |
This function automatically:
If any of these operations fail, buffer and allocation are not created, returned value is negative error code, *pBuffer and *pAllocation are null.
If the function succeeded, you must destroy both buffer and allocation when you no longer need them using either convenience function vmaDestroyBuffer() or separately, using vkDestroyBuffer() and vmaFreeMemory().
VkResult vmaCreateImage | ( | VmaAllocator | allocator, |
const VkImageCreateInfo * | pImageCreateInfo, | ||
const VmaAllocationCreateInfo * | pAllocationCreateInfo, | ||
VkImage * | pImage, | ||
VmaAllocation * | pAllocation, | ||
VmaAllocationInfo * | pAllocationInfo | ||
) |
Function similar to vmaCreateBuffer().
void vmaDestroyBuffer | ( | VmaAllocator | allocator, |
VkBuffer | buffer, | ||
VmaAllocation | allocation | ||
) |
Destroys Vulkan buffer and frees allocated memory.
This is just a convenience function equivalent to:
vkDestroyBuffer(device, buffer, allocationCallbacks); vmaFreeMemory(allocator, allocation);
void vmaDestroyImage | ( | VmaAllocator | allocator, |
VkImage | image, | ||
VmaAllocation | allocation | ||
) |
Destroys Vulkan image and frees allocated memory.
This is just a convenience function equivalent to:
vkDestroyImage(device, image, allocationCallbacks); vmaFreeMemory(allocator, allocation);