- java.lang.Object
-
- java.lang.Enum<VMAMemoryUsage>
-
- com.io7m.jcoronado.vma.VMAMemoryUsage
-
- All Implemented Interfaces:
VulkanEnumIntegerType
,java.io.Serializable
,java.lang.Comparable<VMAMemoryUsage>
public enum VMAMemoryUsage extends java.lang.Enum<VMAMemoryUsage> implements VulkanEnumIntegerType
- See Also:
- "VmaMemoryUsage"
-
-
Enum Constant Summary
Enum Constants Enum Constant Description VMA_MEMORY_USAGE_CPU_ONLY
Memory will be mappable on host.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.VMA_MEMORY_USAGE_GPU_ONLY
Memory will be used on device only, so fast access from the device is preferred.VMA_MEMORY_USAGE_GPU_TO_CPU
Memory mappable on host (guarantees to be `HOST_VISIBLE`) and cached.VMA_MEMORY_USAGE_UNKNOWN
No intended memory usage specified.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
value()
static VMAMemoryUsage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static VMAMemoryUsage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
VMA_MEMORY_USAGE_UNKNOWN
public static final VMAMemoryUsage VMA_MEMORY_USAGE_UNKNOWN
No intended memory usage specified. Use other members of VmaAllocationCreateInfo to specify your requirements.
-
VMA_MEMORY_USAGE_GPU_ONLY
public static final VMAMemoryUsage 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
public static final VMAMemoryUsage 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
public static final VMAMemoryUsage 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
public static final VMAMemoryUsage 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 Detail
-
values
public static VMAMemoryUsage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VMAMemoryUsage c : VMAMemoryUsage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VMAMemoryUsage valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
value
public int value()
- Specified by:
value
in interfaceVulkanEnumIntegerType
- Returns:
- The integer value of the constant
-
-