Vulkan Memory Allocator
|
API elements related to the mechanism of Buffer suballocation - allocating parts of larger buffers that allocator can create implicitly. More...
Classes | |
struct | VmaBufferAllocatorCreateInfo |
Parameters of created VmaBufferAllocator object to be passed to vmaCreateBufferAllocator(). More... | |
struct | VmaBufferSuballocationCreateInfo |
Parameters of created VmaBufferSuballocation object to be passed to vmaBufferAllocatorAllocate(). More... | |
struct | VmaBufferSuballocationInfo |
Parameters of an existing buffer suballocation, returned by vmaBufferAllocatorAllocate() or vmaGetBufferSuballocationInfo(). More... | |
struct | VmaBufferSuballocation |
Represents a single sub-allocation - allocated part of a larger Vulkan buffer. More... | |
struct | VmaBufferAllocator |
Represent main object that can allocate parts of larger Vulkan buffers. More... | |
Enumerations | |
enum | VmaBufferAllocatorCreateFlagBits { VMA_BUFFER_ALLOCATOR_CREATE_LINEAR_ALGORITHM_BIT = 0x00000001 , VMA_BUFFER_ALLOCATOR_CREATE_ALGORITHM_MASK , VMA_BUFFER_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } |
Flags to be passed as VmaBufferAllocatorCreateInfo::flags. More... | |
enum | VmaBufferSuballocationCreateFlagBits { VMA_BUFFER_SUBALLOCATION_CREATE_DEDICATED_BUFFER_BIT = 0x00000001 , VMA_BUFFER_SUBALLOCATION_CREATE_NEVER_CREATE_BUFFER_BIT = 0x00000002 , VMA_BUFFER_SUBALLOCATION_CREATE_NEVER_ALLOCATE_BIT = 0x00000004 , VMA_BUFFER_SUBALLOCATION_CREATE_WITHIN_BUDGET_BIT = 0x00000008 , VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT = 0x00010000 , VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT = 0x00020000 , VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT = 0x00040000 , VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MASK , VMA_BUFFER_SUBALLOCATION_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } |
Flags to be passed as VmaVirtualAllocationCreateInfo::flags. More... | |
Functions | |
VkResult | vmaCreateBufferAllocator (VmaAllocator allocator, const VmaBufferAllocatorCreateInfo *pCreateInfo, VmaBufferAllocator *pBufferAllocator) |
TODO implement! TODO document! More... | |
void | vmaDestroyBufferAllocator (VmaAllocator allocator, VmaBufferAllocator bufferAllocator) |
TODO implement! TODO document! More... | |
VkResult | vmaBufferAllocatorAllocate (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, const VmaBufferSuballocationCreateInfo *pCreateInfo, VmaBufferSuballocation *pBufferSuballocation, VmaBufferSuballocationInfo *pBufferSuballocationInfo) |
TODO implement! TODO document! More... | |
void | vmaBufferAllocatorFree (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation) |
TODO implement! TODO document! More... | |
void | vmaGetBufferSuballocationInfo (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation, VmaBufferSuballocationInfo *pBufferSuballocationInfo) |
TODO implement! TODO document! More... | |
void | vmaSetBufferSuballocationUserData (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation, void *pUserData) |
TODO implement! TODO document! More... | |
VkResult | vmaMapBufferSuballocation (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation, void **ppData) |
TODO implement! TODO document! More... | |
void | vmaUnmapBufferSuballocation (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation) |
TODO implement! TODO document! More... | |
VkResult | vmaFlushBufferSuballocation (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation, VkDeviceSize suballocationLocalOffset, VkDeviceSize size) |
TODO implement! TODO document! More... | |
VkResult | vmaInvalidateBufferSuballocation (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation, VkDeviceSize suballocationLocalOffset, VkDeviceSize size) |
TODO implement! TODO document! More... | |
API elements related to the mechanism of Buffer suballocation - allocating parts of larger buffers that allocator can create implicitly.
Flags to be passed as VmaBufferAllocatorCreateInfo::flags.
typedef VkFlags VmaBufferAllocatorCreateFlags |
Flags to be passed as VmaBufferAllocatorCreateInfo::flags. See VmaBufferAllocatorCreateFlagBits.
typedef struct VmaBufferAllocatorCreateInfo VmaBufferAllocatorCreateInfo |
Parameters of created VmaBufferAllocator object to be passed to vmaCreateBufferAllocator().
Flags to be passed as VmaVirtualAllocationCreateInfo::flags.
typedef VkFlags VmaBufferSuballocationCreateFlags |
Flags to be passed as VmaBufferSuballocationCreateInfo::flags. See VmaBufferSuballocationCreateFlagBits.
typedef struct VmaBufferSuballocationCreateInfo VmaBufferSuballocationCreateInfo |
Parameters of created VmaBufferSuballocation object to be passed to vmaBufferAllocatorAllocate().
typedef struct VmaBufferSuballocationInfo VmaBufferSuballocationInfo |
Parameters of an existing buffer suballocation, returned by vmaBufferAllocatorAllocate() or vmaGetBufferSuballocationInfo().
Flags to be passed as VmaBufferAllocatorCreateInfo::flags.
Enumerator | |
---|---|
VMA_BUFFER_ALLOCATOR_CREATE_LINEAR_ALGORITHM_BIT | Enables alternative, linear allocation algorithm in this virtual block. Specify this flag to enable linear allocation algorithm, which always creates new allocations after last one and doesn't reuse space from allocations freed in between. It trades memory consumption for simplified algorithm and data structure, which has better performance and uses less memory for metadata. By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter Linear allocation algorithm. Internally it uses a Virtual allocator with flag VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT. |
VMA_BUFFER_ALLOCATOR_CREATE_ALGORITHM_MASK | Bit mask to extract only |
VMA_BUFFER_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM |
Flags to be passed as VmaVirtualAllocationCreateInfo::flags.
Enumerator | |
---|---|
VMA_BUFFER_SUBALLOCATION_CREATE_DEDICATED_BUFFER_BIT | Always creates a separate |
VMA_BUFFER_SUBALLOCATION_CREATE_NEVER_CREATE_BUFFER_BIT | Never creates a new |
VMA_BUFFER_SUBALLOCATION_CREATE_NEVER_ALLOCATE_BIT | Never allocates new Vulkan memory. Tries to create the suballocation in a free space of an existing buffer. If not possible, tries to create a new buffer but in existing memory blocks, internally using VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT. If not possible, returns |
VMA_BUFFER_SUBALLOCATION_CREATE_WITHIN_BUDGET_BIT | Creates suballocation only if additional Vulkan memory required for it, if any, won't exceed memory budget. Otherwise return |
VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT | Allocation strategy that chooses smallest possible empty space for the suballocation to minimize memory usage and fragmentation, possibly at the expense of allocation time. |
VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT | Allocation strategy that chooses first suitable empty space for the suballocation - not necessarily in terms of the smallest offset but the one that is easiest and fastest to find to minimize allocation time, possibly at the expense of allocation quality. |
VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT | Allocation strategy that chooses always the lowest offset in available space. This is not the most efficient strategy but achieves highly packed data. Not recommended or useful, provided just for completeness. |
VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MASK | A bit mask to extract only |
VMA_BUFFER_SUBALLOCATION_CREATE_FLAG_BITS_MAX_ENUM |
VkResult vmaBufferAllocatorAllocate | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
const VmaBufferSuballocationCreateInfo * | pCreateInfo, | ||
VmaBufferSuballocation * | pBufferSuballocation, | ||
VmaBufferSuballocationInfo * | pBufferSuballocationInfo | ||
) |
TODO implement! TODO document!
void vmaBufferAllocatorFree | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation | ||
) |
TODO implement! TODO document!
VkResult vmaCreateBufferAllocator | ( | VmaAllocator | allocator, |
const VmaBufferAllocatorCreateInfo * | pCreateInfo, | ||
VmaBufferAllocator * | pBufferAllocator | ||
) |
TODO implement! TODO document!
void vmaDestroyBufferAllocator | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator | ||
) |
TODO implement! TODO document!
VkResult vmaFlushBufferSuballocation | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation, | ||
VkDeviceSize | suballocationLocalOffset, | ||
VkDeviceSize | size | ||
) |
TODO implement! TODO document!
void vmaGetBufferSuballocationInfo | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation, | ||
VmaBufferSuballocationInfo * | pBufferSuballocationInfo | ||
) |
TODO implement! TODO document!
VkResult vmaInvalidateBufferSuballocation | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation, | ||
VkDeviceSize | suballocationLocalOffset, | ||
VkDeviceSize | size | ||
) |
TODO implement! TODO document!
VkResult vmaMapBufferSuballocation | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation, | ||
void ** | ppData | ||
) |
TODO implement! TODO document!
void vmaSetBufferSuballocationUserData | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation, | ||
void * | pUserData | ||
) |
TODO implement! TODO document!
void vmaUnmapBufferSuballocation | ( | VmaAllocator | allocator, |
VmaBufferAllocator | bufferAllocator, | ||
VmaBufferSuballocation | bufferSuballocation | ||
) |
TODO implement! TODO document!