Class VmaMemoryUsage

java.lang.Object
club.doki7.vma.enumtype.VmaMemoryUsage

public final class VmaMemoryUsage extends Object
Intended usage of the allocated memory.
  • Field Details

    • UNKNOWN

      public static final int UNKNOWN
      No 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_ALLOCATED

      Lazily 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 AUTO

      Selects 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 or VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags.

      It can be used only with functions that let the library know VkBufferCreateInfo or VkImageCreateInfo, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions.

      See Also:
    • AUTO_PREFER_DEVICE

      public static final int AUTO_PREFER_DEVICE

      Selects 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 or VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags.

      It can be used only with functions that let the library know VkBufferCreateInfo or VkImageCreateInfo, e.g. vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo(), vmaFindMemoryTypeIndexForImageInfo() and not with generic memory allocation functions.

      See Also:
    • AUTO_PREFER_HOST

      public static final int AUTO_PREFER_HOST

      Selects 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 or VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT in VmaAllocationCreateInfo::flags.

      It can be used only with functions that let the library know VkBufferCreateInfo or VkImageCreateInfo, 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