PVRUtils Enums#

Anchor#

Enum Documentation#

enum class pvr::ui::Anchor#

An Enumeration of all the Anchor points that can be used to position a Sprite. An anchor point is the point to which all positioning will be relative to. Use this to facilitate the laying out of UIs.

Values:

enumerator TopLeft#
enumerator TopCenter#
enumerator TopRight#
enumerator CenterLeft#
enumerator Center#
enumerator CenterRight#
enumerator BottomLeft#
enumerator BottomCenter#
enumerator BottomRight#
enumerator TopLeft
enumerator TopCenter
enumerator TopRight
enumerator CenterLeft
enumerator Center
enumerator CenterRight
enumerator BottomLeft
enumerator BottomCenter
enumerator BottomRight

AllocationCreateFlags#

Enum Documentation#

enum class pvr::utils::vma::AllocationCreateFlags#

The AllocationCreateFlags enum set defines a set of flags which may effect the way in which the device memory is allocated.

Values:

enumerator e_NONE#
enumerator e_DEDICATED_MEMORY_BIT#

brief 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 DeviceMemory, while mapping same DeviceMemory multiple times simultaneously is illegal. You should not use this flag if AllocationCreateInfo::pool is not null.

enumerator e_NEVER_ALLOCATE_BIT#

brief Set this flag to only try to allocate from existing DeviceMemory blocks and never create new such block. If new allocation cannot be placed in any of the existing blocks, allocation fails with pvrvk::Error::e_OUT_OF_DEVICE_MEMORY error. You should not use e_DEDICATED_MEMORY_BIT and e_NEVER_ALLOCATE_BIT at the same time. It makes no sense. If VmaAllocationCreateInfo::pool is not null, this flag is implied and ignored.

enumerator e_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. You cannot map the memory on your own as multiple mappings of a single VkDeviceMemory are illegal. If VmaAllocationCreateInfo::pool is not null, usage of this flag must match usage of flag PoolCreateFlags::e_PERSISTENT_MAP_BIT used during pool creation. 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).

enumerator e_CAN_BECOME_LOST_BIT#

Allocation created with this flag can become lost as a result of another allocation with AllocationCreateFlags::_CAN_MAKE_OTHER_LOST_BIT flag, so you must check it before use. To check if allocation is not lost, call isAllocationLost() on the allocation. For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page.

enumerator e_CAN_MAKE_OTHER_LOST_BIT#

While creating allocation using this flag, other allocations that were created with flag AllocationCreateFlags::e_CAN_BECOME_LOST_BIT can become lost. For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page.

enumerator e_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().

enumerator e_FLAG_BITS_MAX_ENUM#

DebugReportFlags#

Enum Documentation#

enum class pvr::utils::vma::DebugReportFlags#

Debug Report flags to be used when creating the VmaAllocator object. These flags will effect the way in which vma will provide debug logging.

Values:

enumerator None#

Report none.

enumerator DeviceMemory#

Report when allocating and freeing device memory.

enumerator Allocation#

Report when allocating and freeing allocation.

enumerator Defragments#

Report when defragmenting the allocation.

enumerator All#

AllocatorCreateFlags#

Enum Documentation#

enum class pvr::utils::vma::AllocatorCreateFlags#

The AllocatorCreateFlags enum set defines a set of flags modifying the way in which a VmaAllocator will function.

Values:

enumerator e_NONE#
enumerator e_EXTERNALLY_SYNCHRONIZED_BIT#

Allocator and all objects created from it will not be synchronized internally, so you must guarantee they are used from only one thread at a time or synchronized externally by you. Using this flag may increase performance because internal mutexes are not used.

enumerator e_KHR_DEDICATED_ALLOCATION_BIT#

Enables usage of VK_KHR_dedicated_allocation extension. Using this extenion will automatically allocate dedicated blocks of memory for some buffers and images instead of suballocating place for them out of bigger memory blocks (as if you explicitly used VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag) when it is recommended by the driver. It may improve performance on some GPUs. You may set this flag only if you found out that following device extensions are supported, you enabled them while creating Vulkan device passed as VmaAllocatorCreateInfo::device, and you want them to be used internally by this library:

  • VK_KHR_get_memory_requirements2

  • VK_KHR_dedicated_allocation If this flag is enabled, you must also provide VmaAllocatorCreateInfo::pVulkanFunctions and fill at least members: VmaVulkanFunctions::vkGetBufferMemoryRequirements2KHR, VmaVulkanFunctions::vkGetImageMemoryRequirements2KHR, because they are never imported statically. When this flag is set, you can experience following warnings reported by Vulkan validation layer. You can ignore them. vkBindBufferMemory(): Binding memory to buffer 0x2d but vkGetBufferMemoryRequirements() has not been called on that buffer.

enumerator e_FLAG_BITS_MAX_ENUM#

MemoryUsage#

Enum Documentation#

enum class pvr::utils::vma::MemoryUsage#

The MemoryUsage enum set provides a high level mechanism for specifying how created memory will be used.

Values:

enumerator e_UNKNOWN#

No intended memory usage specified. Use other members of VmaAllocationCreateInfo to specify your requirements.

enumerator e_GPU_ONLY#

Memory will be used on device only, so faster access from the device is preferred. No need to be mappable on host.

enumerator e_CPU_ONLY#

Memory will be mapped on host. Could be used for transfer to/from device. Guarantees to be HOST_VISIBLEandHOST_COHERENT.

enumerator e_CPU_TO_GPU#

Memory will be used for frequent (dynamic) updates from host and reads on device (upload). Guarantees to be HOST_VISIBLE.

enumerator e_GPU_TO_CPU#

Memory will be used for frequent writing on device and readback on host (download). Guarantees to be HOST_VISIBLE.

enumerator e_MAX_ENUM#

PoolCreateFlags#

Enum Documentation#

enum class pvr::utils::vma::PoolCreateFlags#

The PoolCreateFlags enum provides a set of flags which will contorl the way in which a VMA pool will function.

Values:

enumerator e_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT#

Use this flag if you always allocate only buffers and linear images or only optimal images out of this pool and so Buffer-Image Granularity can be ignored. This is an optional optimization flag. If you always allocate using MemoryAllocator::createBuffer(), MemoryAllocator::createImage(), MemoryAllocator::allocateMemoryForBuffer(), then you don’t need to use it because allocator knows exact type of your allocations so it can handle Buffer-Image Granularity in the optimal way. If you also allocate using allocateMemoryForImage() or allocateMemory(), exact type of such allocations is not known, so allocator must be conservative in handling Buffer-Image Granularity, which can lead to suboptimal allocation (wasted memory). In that case, if you can make sure you always allocate only buffers and linear images or only optimal images out of this pool, use this flag to make allocator disregard Buffer-Image Granularity and so make allocations more optimal.

enumerator e_FLAG_BITS_MAX_ENUM#