Vulkan Memory Allocator
|
Functions | |
VkResult | vmaCreateBuffer (VmaAllocator allocator, const VkBufferCreateInfo *pCreateInfo, const VmaMemoryRequirements *pMemoryRequirements, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo) |
void | vmaDestroyBuffer (VmaAllocator allocator, VkBuffer buffer, VmaAllocation allocation) |
VkResult | vmaCreateImage (VmaAllocator allocator, const VkImageCreateInfo *pCreateInfo, const VmaMemoryRequirements *pMemoryRequirements, VkImage *pImage, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo) |
Function similar to vmaCreateBuffer(). More... | |
void | vmaDestroyImage (VmaAllocator allocator, VkImage image, VmaAllocation allocation) |
VkResult vmaCreateBuffer | ( | VmaAllocator | allocator, |
const VkBufferCreateInfo * | pCreateInfo, | ||
const VmaMemoryRequirements * | pMemoryRequirements, | ||
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 * | pCreateInfo, | ||
const VmaMemoryRequirements * | pMemoryRequirements, | ||
VkImage * | pImage, | ||
VmaAllocation * | pAllocation, | ||
VmaAllocationInfo * | pAllocationInfo | ||
) |
Function similar to vmaCreateBuffer().
void vmaDestroyBuffer | ( | VmaAllocator | allocator, |
VkBuffer | buffer, | ||
VmaAllocation | allocation | ||
) |
void vmaDestroyImage | ( | VmaAllocator | allocator, |
VkImage | image, | ||
VmaAllocation | allocation | ||
) |