Class VmaMemoryUsage
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Selects best memory type automatically.static final int
Selects best memory type automatically with preference for GPU (device) memory.static final int
Selects best memory type automatically with preference for CPU (host) memory.static final int
static final int
static final int
static final int
Lazily allocated GPU memory havingVK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
.static final int
static final int
static final int
static final int
No intended memory usage specified. -
Method Summary
-
Field Details
-
UNKNOWN
public static final int UNKNOWNNo intended memory usage specified. Use other members of VmaAllocationCreateInfo to specify your requirements.- See Also:
-
GPU_ONLY
public static final int GPU_ONLY- See Also:
-
CPU_ONLY
public static final int CPU_ONLY- See Also:
-
CPU_TO_GPU
public static final int CPU_TO_GPU- See Also:
-
GPU_TO_CPU
public static final int GPU_TO_CPU- See Also:
-
CPU_COPY
public static final int CPU_COPY- See Also:
-
GPU_LAZILY_ALLOCATED
public static final int GPU_LAZILY_ALLOCATEDLazily allocated GPU memory having
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
. Exists mostly on mobile platforms. Using it on desktop PC or other GPUs with no such memory type present will fail the allocation.Usage: Memory for transient attachment images (color attachments, depth attachments etc.), created with
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
.Allocations with this usage are always created as dedicated - it implies
VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT
.- See Also:
-
AUTO
public static final int AUTOSelects best memory type automatically. This flag is recommended for most common use cases.
When using this flag, if you want to map the allocation (using vmaMapMemory() or
VMA_ALLOCATION_CREATE_MAPPED_BIT
), you must pass one of the flags:VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT
orVMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT
in VmaAllocationCreateInfo::flags.It can be used only with functions that let the library know
VkBufferCreateInfo
orVkImageCreateInfo
, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions.- See Also:
-
AUTO_PREFER_DEVICE
public static final int AUTO_PREFER_DEVICESelects best memory type automatically with preference for GPU (device) memory.
When using this flag, if you want to map the allocation (using vmaMapMemory() or
VMA_ALLOCATION_CREATE_MAPPED_BIT
), you must pass one of the flags:VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT
orVMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT
in VmaAllocationCreateInfo::flags.It can be used only with functions that let the library know
VkBufferCreateInfo
orVkImageCreateInfo
, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions.- See Also:
-
AUTO_PREFER_HOST
public static final int AUTO_PREFER_HOSTSelects best memory type automatically with preference for CPU (host) memory.
When using this flag, if you want to map the allocation (using vmaMapMemory() or
VMA_ALLOCATION_CREATE_MAPPED_BIT
), you must pass one of the flags:VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT
orVMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT
in VmaAllocationCreateInfo::flags.It can be used only with functions that let the library know
VkBufferCreateInfo
orVkImageCreateInfo
, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions.- See Also:
-
MAX_ENUM
public static final int MAX_ENUM- See Also:
-
-
Method Details
-
explain
-