Vulkan Memory Allocator
|
#include <vk_mem_alloc.h>
Public Attributes | |
VkBool32 | ownMemory |
Set to true if this allocation should have its own memory block. More... | |
VmaMemoryUsage | usage |
Intended usage of memory. More... | |
VkMemoryPropertyFlags | requiredFlags |
Flags that must be set in a Memory Type chosen for an allocation. More... | |
VkMemoryPropertyFlags | preferredFlags |
Flags that preferably should be set in a Memory Type chosen for an allocation. More... | |
VkBool32 | neverAllocate |
Set this flag to only try to allocate from existing VkDeviceMemory blocks and never create new such block. More... | |
VkBool32 VmaMemoryRequirements::neverAllocate |
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 ownMemory and neverAllocate at the same time.
VkBool32 VmaMemoryRequirements::ownMemory |
Set to true if this 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.
VkMemoryPropertyFlags VmaMemoryRequirements::preferredFlags |
Flags that preferably should be set in a Memory Type chosen for an allocation.
Set to 0 if no additional flags are prefered and only requiredFlags should be used. If not 0, it must be a superset or equal to requiredFlags.
VkMemoryPropertyFlags VmaMemoryRequirements::requiredFlags |
Flags that must be set in a Memory Type chosen for an allocation.
Leave 0 if you specify requirement via usage.
VmaMemoryUsage VmaMemoryRequirements::usage |
Intended usage of memory.
Leave VMA_MEMORY_USAGE_UNKNOWN if you specify requiredFlags. You can also use both.