Vulkan Memory Allocator
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
Buffer suballocation

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 vmaGetBufferSuballocationInfo(). More...
 
struct  VmaBufferSuballocation
 TODO document! More...
 
struct  VmaBufferAllocator
 TODO document! More...
 

Typedefs

typedef enum VmaBufferAllocatorCreateFlagBits VmaBufferAllocatorCreateFlagBits
 Flags to be passed as VmaBufferAllocatorCreateInfo::flags. More...
 
typedef VkFlags VmaBufferAllocatorCreateFlags
 Flags to be passed as VmaBufferAllocatorCreateInfo::flags. See VmaBufferAllocatorCreateFlagBits. More...
 
typedef enum VmaBufferSuballocationCreateFlagBits VmaBufferSuballocationCreateFlagBits
 Flags to be passed as VmaVirtualAllocationCreateInfo::flags. More...
 
typedef VkFlags VmaBufferSuballocationCreateFlags
 Flags to be passed as VmaBufferSuballocationCreateInfo::flags. See VmaBufferSuballocationCreateFlagBits. More...
 
typedef struct VmaBufferAllocatorCreateInfo VmaBufferAllocatorCreateInfo
 Parameters of created VmaBufferAllocator object to be passed to vmaCreateBufferAllocator(). More...
 
typedef struct VmaBufferSuballocationCreateInfo VmaBufferSuballocationCreateInfo
 Parameters of created VmaBufferSuballocation object to be passed to vmaBufferAllocatorAllocate(). More...
 
typedef struct VmaBufferSuballocationInfo VmaBufferSuballocationInfo
 Parameters of an existing buffer suballocation, returned by vmaGetBufferSuballocationInfo(). 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_ALLOCATE_BIT = 0x00000002 , VMA_BUFFER_SUBALLOCATION_CREATE_WITHIN_BUDGET_BIT = 0x00000004 , 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 offset, VkDeviceSize size)
 TODO implement! TODO document! More...
 
VkResult vmaInvalidateBufferSuballocation (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, VmaBufferSuballocation bufferSuballocation, VkDeviceSize offset, VkDeviceSize size)
 TODO implement! TODO document! More...
 
VkResult vmaFlushBufferSuballocations (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, uint32_t bufferSuballocationCount, const VmaBufferSuballocation *pBufferSuballocations, const VkDeviceSize *pOffset, const VkDeviceSize *pSizes)
 TODO implement! TODO document! More...
 
VkResult vmaInvalidateBufferSuballocations (VmaAllocator allocator, VmaBufferAllocator bufferAllocator, const VmaBufferSuballocation *pBufferSuballocations, const VkDeviceSize *pOffset, const VkDeviceSize *pSizes)
 TODO implement! TODO document! More...
 

Detailed Description

API elements related to the mechanism of Buffer suballocation - allocating parts of larger buffers that allocator can create implicitly.

Typedef Documentation

◆ VmaBufferAllocatorCreateFlagBits

Flags to be passed as VmaBufferAllocatorCreateInfo::flags.

◆ VmaBufferAllocatorCreateFlags

◆ VmaBufferAllocatorCreateInfo

Parameters of created VmaBufferAllocator object to be passed to vmaCreateBufferAllocator().

◆ VmaBufferSuballocationCreateFlagBits

Flags to be passed as VmaVirtualAllocationCreateInfo::flags.

◆ VmaBufferSuballocationCreateFlags

◆ VmaBufferSuballocationCreateInfo

Parameters of created VmaBufferSuballocation object to be passed to vmaBufferAllocatorAllocate().

◆ VmaBufferSuballocationInfo

Parameters of an existing buffer suballocation, returned by vmaGetBufferSuballocationInfo().

Enumeration Type Documentation

◆ VmaBufferAllocatorCreateFlagBits

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.

Under the hood, it uses a Virtual allocator with flag VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT.

TODO implement!

VMA_BUFFER_ALLOCATOR_CREATE_ALGORITHM_MASK 

Bit mask to extract only ALGORITHM bits from entire set of flags.

VMA_BUFFER_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM 

◆ VmaBufferSuballocationCreateFlagBits

Flags to be passed as VmaVirtualAllocationCreateInfo::flags.

Enumerator
VMA_BUFFER_SUBALLOCATION_CREATE_DEDICATED_BUFFER_BIT 

TODO document! TODO implement!

VMA_BUFFER_SUBALLOCATION_CREATE_NEVER_ALLOCATE_BIT 

TODO document! TODO implement!

VMA_BUFFER_SUBALLOCATION_CREATE_WITHIN_BUDGET_BIT 

TODO document! TODO implement!

VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT 

TODO document! TODO implement!

VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT 

TODO document! TODO implement!

VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT 

TODO document! TODO implement!

VMA_BUFFER_SUBALLOCATION_CREATE_STRATEGY_MASK 

A bit mask to extract only STRATEGY bits from entire set of flags.

VMA_BUFFER_SUBALLOCATION_CREATE_FLAG_BITS_MAX_ENUM 

Function Documentation

◆ vmaBufferAllocatorAllocate()

VkResult vmaBufferAllocatorAllocate ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
const VmaBufferSuballocationCreateInfo pCreateInfo,
VmaBufferSuballocation pBufferSuballocation,
VmaBufferSuballocationInfo pBufferSuballocationInfo 
)

TODO implement! TODO document!

◆ vmaBufferAllocatorFree()

void vmaBufferAllocatorFree ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation 
)

TODO implement! TODO document!

◆ vmaCreateBufferAllocator()

VkResult vmaCreateBufferAllocator ( VmaAllocator  allocator,
const VmaBufferAllocatorCreateInfo pCreateInfo,
VmaBufferAllocator pBufferAllocator 
)

TODO implement! TODO document!

◆ vmaDestroyBufferAllocator()

void vmaDestroyBufferAllocator ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator 
)

TODO implement! TODO document!

◆ vmaFlushBufferSuballocation()

VkResult vmaFlushBufferSuballocation ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation,
VkDeviceSize  offset,
VkDeviceSize  size 
)

TODO implement! TODO document!

◆ vmaFlushBufferSuballocations()

VkResult vmaFlushBufferSuballocations ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
uint32_t  bufferSuballocationCount,
const VmaBufferSuballocation pBufferSuballocations,
const VkDeviceSize *  pOffset,
const VkDeviceSize *  pSizes 
)

TODO implement! TODO document!

◆ vmaGetBufferSuballocationInfo()

void vmaGetBufferSuballocationInfo ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation,
VmaBufferSuballocationInfo pBufferSuballocationInfo 
)

TODO implement! TODO document!

◆ vmaInvalidateBufferSuballocation()

VkResult vmaInvalidateBufferSuballocation ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation,
VkDeviceSize  offset,
VkDeviceSize  size 
)

TODO implement! TODO document!

◆ vmaInvalidateBufferSuballocations()

VkResult vmaInvalidateBufferSuballocations ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
const VmaBufferSuballocation pBufferSuballocations,
const VkDeviceSize *  pOffset,
const VkDeviceSize *  pSizes 
)

TODO implement! TODO document!

◆ vmaMapBufferSuballocation()

VkResult vmaMapBufferSuballocation ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation,
void **  ppData 
)

TODO implement! TODO document!

◆ vmaSetBufferSuballocationUserData()

void vmaSetBufferSuballocationUserData ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation,
void *  pUserData 
)

TODO implement! TODO document!

◆ vmaUnmapBufferSuballocation()

void vmaUnmapBufferSuballocation ( VmaAllocator  allocator,
VmaBufferAllocator  bufferAllocator,
VmaBufferSuballocation  bufferSuballocation 
)

TODO implement! TODO document!