Class VmaAllocationInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VmaAllocationInfo
    extends Struct
    implements NativeResource

    Member documentation

    • memoryType – memory type index that this allocation was allocated from.

      It never changes.

    • deviceMemory – handle to Vulkan memory object.

      Same memory object can be shared by multiple allocations.

      It can change after call to Defragment if this allocation is passed to the function, or if allocation is lost.

      If the allocation is lost, it is equal to VK_NULL_HANDLE.

    • offset – offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this allocation.

      It can change after call to Defragment if this allocation is passed to the function, or if allocation is lost.

    • size – size of this allocation, in bytes.

      It never changes, unless allocation is lost.

    • pMappedData – pointer to the beginning of this allocation as mapped data.

      If the allocation hasn't been mapped using MapMemory and hasn't been created with ALLOCATION_CREATE_MAPPED_BIT flag, this value null.

      It can change after call to MapMemory, UnmapMemory. It can also change after call to Defragment if this allocation is passed to the function.

    • pUserData – custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using SetAllocationUserData.

      It can change after call to SetAllocationUserData for this allocation.

    Layout

    
     struct VmaAllocationInfo {
         uint32_t memoryType;
         VkDeviceMemory deviceMemory;
         VkDeviceSize offset;
         VkDeviceSize size;
         void * pMappedData;
         void * pUserData;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MEMORYTYPE, DEVICEMEMORY, OFFSET, SIZE, PMAPPEDDATA, PUSERDATA

        The struct member offsets.
    • Constructor Detail

      • VmaAllocationInfo

        public VmaAllocationInfo​(java.nio.ByteBuffer container)
        Creates a VmaAllocationInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.