Enum VMAAllocationCreateFlag

    • Enum Constant Detail


        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.

        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.

        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.

        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.

        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.

        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 Detail

      • values

        public static VMAAllocationCreateFlag[] 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 (VMAAllocationCreateFlag c : VMAAllocationCreateFlag.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static VMAAllocationCreateFlag 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.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null