Enum Class VMAMemoryUsage

java.lang.Object
java.lang.Enum<VMAMemoryUsage>
com.io7m.jcoronado.vma.VMAMemoryUsage
All Implemented Interfaces:
VulkanEnumIntegerType, Serializable, Comparable<VMAMemoryUsage>, Constable

public enum VMAMemoryUsage extends Enum<VMAMemoryUsage> implements VulkanEnumIntegerType
See Also:
  • "VmaMemoryUsage"
  • Enum Constant Details

    • 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 Details

    • values

      public static VMAMemoryUsage[] 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

      public static VMAMemoryUsage valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • value

      public int value()
      Specified by:
      value in interface VulkanEnumIntegerType
      Returns:
      The integer value of the constant