Vulkan Memory Allocator
|
Classes | |
struct | VmaAllocationCreateInfo |
Typedefs | |
typedef enum VmaMemoryUsage | VmaMemoryUsage |
typedef enum VmaAllocationCreateFlagBits | VmaAllocationCreateFlagBits |
Flags to be passed as VmaAllocationCreateInfo::flags. More... | |
typedef VkFlags | VmaAllocationCreateFlags |
typedef struct VmaAllocationCreateInfo | VmaAllocationCreateInfo |
Enumerations | |
enum | VmaMemoryUsage { VMA_MEMORY_USAGE_UNKNOWN = 0, VMA_MEMORY_USAGE_GPU_ONLY = 1, VMA_MEMORY_USAGE_CPU_ONLY = 2, VMA_MEMORY_USAGE_CPU_TO_GPU = 3, VMA_MEMORY_USAGE_GPU_TO_CPU = 4, VMA_MEMORY_USAGE_MAX_ENUM = 0x7FFFFFFF } |
enum | VmaAllocationCreateFlagBits { VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT = 0x00000001, VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT = 0x00000002, VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT = 0x00000004, VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT = 0x00000008, VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT = 0x00000010, VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } |
Flags to be passed as VmaAllocationCreateInfo::flags. More... | |
Functions | |
VkResult | vmaFindMemoryTypeIndex (VmaAllocator allocator, uint32_t memoryTypeBits, const VmaAllocationCreateInfo *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex) |
typedef enum VmaAllocationCreateFlagBits VmaAllocationCreateFlagBits |
Flags to be passed as VmaAllocationCreateInfo::flags.
typedef VkFlags VmaAllocationCreateFlags |
typedef struct VmaAllocationCreateInfo VmaAllocationCreateInfo |
typedef enum VmaMemoryUsage VmaMemoryUsage |
Flags to be passed as VmaAllocationCreateInfo::flags.
Enumerator | |
---|---|
VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT | Set this flag if the allocation should have its own memory block. Use it for special, big resources, like fullscreen images used as attachments. This flag must also be used for host visible resources that you want to map simultaneously because otherwise they might end up as regions of the same You should not use this flag if VmaAllocationCreateInfo::pool is not null. |
VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT | Set this flag to only try to allocate from existing If new allocation cannot be placed in any of the existing blocks, allocation fails with You should not use If VmaAllocationCreateInfo::pool is not null, this flag is implied and ignored. |
VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT | Set this flag to use a memory that will be persistently mapped and retrieve pointer to it. Pointer to mapped memory will be returned through VmaAllocationInfo::pMappedData. You cannot map the memory on your own as multiple mappings of a single If VmaAllocationCreateInfo::pool is not null, usage of this flag must match usage of flag Is it valid to use this flag for allocation made from memory type that is not |
VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT | Allocation created with this flag can become lost as a result of another allocation with To check if allocation is not lost, call vmaGetAllocationInfo() and check if VmaAllocationInfo::deviceMemory is not For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page. |
VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT | While creating allocation using this flag, other allocations that were created with flag For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page. |
VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM |
enum VmaMemoryUsage |
VkResult vmaFindMemoryTypeIndex | ( | VmaAllocator | allocator, |
uint32_t | memoryTypeBits, | ||
const VmaAllocationCreateInfo * | pAllocationCreateInfo, | ||
uint32_t * | pMemoryTypeIndex | ||
) |
This algorithm tries to find a memory type that: