Enum Class VMAMemoryUsage
- All Implemented Interfaces:
VulkanEnumIntegerType, Serializable, Comparable<VMAMemoryUsage>, Constable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMemory will be mappable on host.Memory that is both mappable on host (guarantees to be `HOST_VISIBLE`) and preferably fast to access by GPU.Memory will be used on device only, so fast access from the device is preferred.Memory mappable on host (guarantees to be `HOST_VISIBLE`) and cached.No intended memory usage specified. -
Method Summary
Modifier and TypeMethodDescriptionintvalue()static VMAMemoryUsageReturns the enum constant of this class with the specified name.static VMAMemoryUsage[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VMA_MEMORY_USAGE_UNKNOWN
No intended memory usage specified. Use other members of VmaAllocationCreateInfo to specify your requirements. -
VMA_MEMORY_USAGE_GPU_ONLY
Memory will be used on device only, so fast access from the device is preferred. It usually means device-local GPU (video) memory. No need to be mappable on host. It is roughly equivalent of `D3D12_HEAP_TYPE_DEFAULT`. Usage: - Resources written and read by device, e.g. images used as attachments. - Resources transferred from host once (immutable) or infrequently and read by device multiple times, e.g. textures to be sampled, vertex buffers, uniform (constant) buffers, and majority of other types of resources used by device. Allocation may still end up in `HOST_VISIBLE` memory on some implementations. In such case, you are free to map it. You can use #VMA_ALLOCATION_CREATE_MAPPED_BIT with this usage type. -
VMA_MEMORY_USAGE_CPU_ONLY
Memory will be mappable on host. It usually means CPU (system) memory. Resources created in this pool may still be accessible to the device, but access to them can be slower. Guarantees to be `HOST_VISIBLE` and `HOST_COHERENT`. CPU read may be uncached. It is roughly equivalent of `D3D12_HEAP_TYPE_UPLOAD`. Usage: Staging copy of resources used as transfer source. -
VMA_MEMORY_USAGE_CPU_TO_GPU
Memory that is both mappable on host (guarantees to be `HOST_VISIBLE`) and preferably fast to access by GPU. CPU reads may be uncached and very slow. Usage: Resources written frequently by host (dynamic), read by device. E.g. textures, vertex buffers, uniform buffers updated every frame or every draw call. -
VMA_MEMORY_USAGE_GPU_TO_CPU
Memory mappable on host (guarantees to be `HOST_VISIBLE`) and cached. It is roughly equivalent of `D3D12_HEAP_TYPE_READBACK`. Usage: - Resources written by device, read by host - results of some computations, e.g. screen capture, average scene luminance for HDR tone mapping. - Any resources read or accessed randomly on host, e.g. CPU-side copy of vertex buffer used as source of transfer, but also used for collision detection.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
value
public int value()- Specified by:
valuein interfaceVulkanEnumIntegerType- Returns:
- The integer value of the constant
-