Enum Class VMAAllocationCreateFlag

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

public enum VMAAllocationCreateFlag extends Enum<VMAAllocationCreateFlag> implements VulkanEnumBitmaskType
See Also:
  • "VmaAllocationCreateFlagBits"
  • Enum Constant Details

    • VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT

      public static final VMAAllocationCreateFlag VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT
      Set this flag if the allocation should have its own memory block. Use it for special, big resources, like fullscreen images used as attachments. This flag must also be used for host visible resources that you want to map simultaneously because otherwise they might end up as regions of the same `VkDeviceMemory`, while mapping same `VkDeviceMemory` multiple times simultaneously is illegal. You should not use this flag if VmaAllocationCreateInfo::pool is not null.
    • VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT

      public static final VMAAllocationCreateFlag VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT
      Set this flag to only try to allocate from existing `VkDeviceMemory` blocks and never create new such block. If new allocation cannot be placed in any of the existing blocks, allocation fails with `VK_ERROR_OUT_OF_DEVICE_MEMORY` error. You should not use #VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT and #VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT at the same time. It makes no sense. If VmaAllocationCreateInfo::pool is not null, this flag is implied and ignored.
    • VMA_ALLOCATION_CREATE_MAPPED_BIT

      public static final VMAAllocationCreateFlag VMA_ALLOCATION_CREATE_MAPPED_BIT
      Set this flag to use a memory that will be persistently mapped and retrieve pointer to it. Pointer to mapped memory will be returned through VmaAllocationInfo::pMappedData. Is it valid to use this flag for allocation made from memory type that is not `HOST_VISIBLE`. This flag is then ignored and memory is not mapped. This is useful if you need an allocation that is efficient to use on GPU (`DEVICE_LOCAL`) and still want to map it directly if possible on platforms that support it (e.g. Intel GPU). You should not use this flag together with #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT.
    • VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT

      public static final VMAAllocationCreateFlag VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT
      Allocation created with this flag can become lost as a result of another allocation with #VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT flag, so you must check it before use. To check if allocation is not lost, call vmaGetAllocationInfo() and check if VmaAllocationInfo::deviceMemory is not `VK_NULL_HANDLE`. For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page. You should not use this flag together with #VMA_ALLOCATION_CREATE_MAPPED_BIT.
    • VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT

      public static final VMAAllocationCreateFlag VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT
      While creating allocation using this flag, other allocations that were created with flag #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT can become lost. For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page.
    • VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT

      public static final VMAAllocationCreateFlag VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT
      Set this flag to treat VmaAllocationCreateInfo::pUserData as pointer to a null-terminated string. Instead of copying pointer value, a local copy of the string is made and stored in allocation's `pUserData`. The string is automatically freed together with the allocation. It is also used in vmaBuildStatsString().
  • Method Details

    • values

      public static VMAAllocationCreateFlag[] 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 VMAAllocationCreateFlag 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 VulkanEnumBitmaskType
      Returns:
      The integer value of the constant