Class VmaAllocationInfo2

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VmaAllocationInfo2>
org.lwjgl.util.vma.VmaAllocationInfo2
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VmaAllocationInfo2 extends org.lwjgl.system.Struct<VmaAllocationInfo2> implements org.lwjgl.system.NativeResource
Extended parameters of a VmaAllocation object that can be retrieved using function GetAllocationInfo2.

Layout


 struct VmaAllocationInfo2 {
     VmaAllocationInfo allocationInfo();
     VkDeviceSize blockSize();
     VkBool32 dedicatedMemory();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • ALLOCATIONINFO

      public static final int ALLOCATIONINFO
      The struct member offsets.
    • BLOCKSIZE

      public static final int BLOCKSIZE
      The struct member offsets.
    • DEDICATEDMEMORY

      public static final int DEDICATEDMEMORY
      The struct member offsets.
  • Constructor Details

    • VmaAllocationInfo2

      public VmaAllocationInfo2(ByteBuffer container)
      Creates a VmaAllocationInfo2 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.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VmaAllocationInfo2>
    • allocationInfo

      public VmaAllocationInfo allocationInfo()
      Basic parameters of the allocation.

      If you need only these, you can use function GetAllocationInfo and structure VmaAllocationInfo instead.

    • blockSize

      public long blockSize()
      Size of the VkDeviceMemory block that the allocation belongs to.

      In case of an allocation with dedicated memory, it will be equal to allocationInfo.size.

    • dedicatedMemory

      public boolean dedicatedMemory()
      VK_TRUE if the allocation has dedicated memory, VK_FALSE if it was placed as part of a larger memory block.

      When VK_TRUE, it also means VkMemoryDedicatedAllocateInfo was used when creating the allocation (if VK_KHR_dedicated_allocation extension or Vulkan version ≥ 1.1 is enabled).

    • malloc

      public static VmaAllocationInfo2 malloc()
      Returns a new VmaAllocationInfo2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VmaAllocationInfo2 calloc()
      Returns a new VmaAllocationInfo2 instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VmaAllocationInfo2 create()
      Returns a new VmaAllocationInfo2 instance allocated with BufferUtils.
    • create

      public static VmaAllocationInfo2 create(long address)
      Returns a new VmaAllocationInfo2 instance for the specified memory address.
    • createSafe

      public static @Nullable VmaAllocationInfo2 createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VmaAllocationInfo2.Buffer malloc(int capacity)
      Returns a new VmaAllocationInfo2.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VmaAllocationInfo2.Buffer calloc(int capacity)
      Returns a new VmaAllocationInfo2.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VmaAllocationInfo2.Buffer create(int capacity)
      Returns a new VmaAllocationInfo2.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VmaAllocationInfo2.Buffer create(long address, int capacity)
      Create a VmaAllocationInfo2.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VmaAllocationInfo2.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VmaAllocationInfo2 malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VmaAllocationInfo2 instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VmaAllocationInfo2 calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VmaAllocationInfo2 instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VmaAllocationInfo2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VmaAllocationInfo2.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VmaAllocationInfo2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VmaAllocationInfo2.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nallocationInfo

      public static VmaAllocationInfo nallocationInfo(long struct)
      Unsafe version of allocationInfo().
    • nblockSize

      public static long nblockSize(long struct)
      Unsafe version of blockSize().
    • ndedicatedMemory

      public static int ndedicatedMemory(long struct)
      Unsafe version of dedicatedMemory().