Vulkan Memory Allocator
|
Classes | |
struct | VmaMemoryRequirements |
Typedefs | |
typedef enum VmaMemoryUsage | VmaMemoryUsage |
typedef enum VmaMemoryRequirementFlagBits | VmaMemoryRequirementFlagBits |
Flags to be passed as VmaMemoryRequirements::flags. More... | |
typedef VkFlags | VmaMemoryRequirementFlags |
typedef struct VmaMemoryRequirements | VmaMemoryRequirements |
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 | VmaMemoryRequirementFlagBits { VMA_MEMORY_REQUIREMENT_OWN_MEMORY_BIT = 0x00000001, VMA_MEMORY_REQUIREMENT_NEVER_ALLOCATE_BIT = 0x00000002, VMA_MEMORY_REQUIREMENT_PERSISTENT_MAP_BIT = 0x00000004, VMA_MEMORY_REQUIREMENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } |
Flags to be passed as VmaMemoryRequirements::flags. More... | |
Functions | |
VkResult | vmaFindMemoryTypeIndex (VmaAllocator allocator, uint32_t memoryTypeBits, const VmaMemoryRequirements *pMemoryRequirements, uint32_t *pMemoryTypeIndex) |
typedef enum VmaMemoryRequirementFlagBits VmaMemoryRequirementFlagBits |
Flags to be passed as VmaMemoryRequirements::flags.
typedef VkFlags VmaMemoryRequirementFlags |
typedef struct VmaMemoryRequirements VmaMemoryRequirements |
typedef enum VmaMemoryUsage VmaMemoryUsage |
Flags to be passed as VmaMemoryRequirements::flags.
Enumerator | |
---|---|
VMA_MEMORY_REQUIREMENT_OWN_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 VkDeviceMemory, while mapping same VkDeviceMemory multiple times is illegal. |
VMA_MEMORY_REQUIREMENT_NEVER_ALLOCATE_BIT | Set this flag to only try to allocate from existing VkDeviceMemory blocks and never create new such block. If new allocation cannot be placed in any of the existing blocks, allocation fails with VK_ERROR_OUT_OF_DEVICE_MEMORY error. It makes no sense to set VMA_MEMORY_REQUIREMENT_OWN_MEMORY_BIT and VMA_MEMORY_REQUIREMENT_NEVER_ALLOCATE_BIT at the same time. |
VMA_MEMORY_REQUIREMENT_PERSISTENT_MAP_BIT | Set 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 maps of a single VkDeviceMemory are illegal. |
VMA_MEMORY_REQUIREMENT_FLAG_BITS_MAX_ENUM |
enum VmaMemoryUsage |
VkResult vmaFindMemoryTypeIndex | ( | VmaAllocator | allocator, |
uint32_t | memoryTypeBits, | ||
const VmaMemoryRequirements * | pMemoryRequirements, | ||
uint32_t * | pMemoryTypeIndex | ||
) |
This algorithm tries to find a memory type that: