Class VmaAllocationInfo2

java.lang.Object
overrungl.struct.GroupType
overrungl.vma.VmaAllocationInfo2
All Implemented Interfaces:
Addressable

public final class VmaAllocationInfo2 extends GroupType

Layout

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

    • LAYOUT

      public static final GroupLayout LAYOUT
      The struct layout of VmaAllocationInfo2.
    • OFFSET_allocationInfo

      public static final long OFFSET_allocationInfo
      The byte offset of allocationInfo.
    • LAYOUT_allocationInfo

      public static final MemoryLayout LAYOUT_allocationInfo
      The memory layout of allocationInfo.
    • OFFSET_blockSize

      public static final long OFFSET_blockSize
      The byte offset of blockSize.
    • LAYOUT_blockSize

      public static final MemoryLayout LAYOUT_blockSize
      The memory layout of blockSize.
    • VH_blockSize

      public static final VarHandle VH_blockSize
      The VarHandle of blockSize of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_dedicatedMemory

      public static final long OFFSET_dedicatedMemory
      The byte offset of dedicatedMemory.
    • LAYOUT_dedicatedMemory

      public static final MemoryLayout LAYOUT_dedicatedMemory
      The memory layout of dedicatedMemory.
    • VH_dedicatedMemory

      public static final VarHandle VH_dedicatedMemory
      The VarHandle of dedicatedMemory of type (MemorySegment base, long baseOffset, long index)MemorySegment.
  • Constructor Details

    • VmaAllocationInfo2

      public VmaAllocationInfo2(MemorySegment segment, long elementCount)
      Creates VmaAllocationInfo2 with the given segment.
      Parameters:
      segment - the memory segment
      elementCount - the element count of this struct buffer
  • Method Details

    • of

      public static VmaAllocationInfo2 of(MemorySegment segment)
      Creates VmaAllocationInfo2 with the given segment.
      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static VmaAllocationInfo2 ofNative(MemorySegment segment)

      Creates VmaAllocationInfo2 with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static VmaAllocationInfo2 ofNative(MemorySegment segment, long count)

      Creates VmaAllocationInfo2 with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      count - the count of the buffer
      Returns:
      the created instance or null if the segment is NULL
    • alloc

      public static VmaAllocationInfo2 alloc(SegmentAllocator allocator)
      Allocates a VmaAllocationInfo2 with the given segment allocator.
      Parameters:
      allocator - the segment allocator
      Returns:
      the allocated VmaAllocationInfo2
    • alloc

      public static VmaAllocationInfo2 alloc(SegmentAllocator allocator, long count)
      Allocates a VmaAllocationInfo2 with the given segment allocator and count.
      Parameters:
      allocator - the segment allocator
      count - the count
      Returns:
      the allocated VmaAllocationInfo2
    • copyFrom

      public VmaAllocationInfo2 copyFrom(VmaAllocationInfo2 src)
      Copies from the given source.
      Parameters:
      src - the source
      Returns:
      this
    • reinterpret

      public VmaAllocationInfo2 reinterpret(long count)
      Reinterprets this buffer with the given count.
      Parameters:
      count - the new count
      Returns:
      the reinterpreted buffer
    • allocationInfo

      public static MemorySegment allocationInfo(MemorySegment segment, long index)
      Returns allocationInfo at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      allocationInfo at the given index
    • allocationInfo

      public MemorySegment allocationInfo()
      Returns allocationInfo.
      Returns:
      allocationInfo
    • allocationInfo

      public static void allocationInfo(MemorySegment segment, long index, MemorySegment value)
      Sets allocationInfo with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • allocationInfo

      public VmaAllocationInfo2 allocationInfo(MemorySegment value)
      Sets allocationInfo with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • allocationInfo

      public VmaAllocationInfo2 allocationInfo(Consumer<VmaAllocationInfo> func)
      Accepts allocationInfo with the given function.
      Parameters:
      func - the function
      Returns:
      this
    • blockSize

      public static long blockSize(MemorySegment segment, long index)
      Returns blockSize at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      blockSize at the given index
    • blockSize

      public long blockSize()
      Returns blockSize.
      Returns:
      blockSize
    • blockSize

      public static void blockSize(MemorySegment segment, long index, long value)
      Sets blockSize with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • blockSize

      public VmaAllocationInfo2 blockSize(long value)
      Sets blockSize with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • dedicatedMemory

      public static int dedicatedMemory(MemorySegment segment, long index)
      Returns dedicatedMemory at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      dedicatedMemory at the given index
    • dedicatedMemory

      public int dedicatedMemory()
      Returns dedicatedMemory.
      Returns:
      dedicatedMemory
    • dedicatedMemory

      public static void dedicatedMemory(MemorySegment segment, long index, int value)
      Sets dedicatedMemory with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • dedicatedMemory

      public VmaAllocationInfo2 dedicatedMemory(int value)
      Sets dedicatedMemory with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • asSlice

      public VmaAllocationInfo2 asSlice(long index)
      Creates a slice of VmaAllocationInfo2.
      Parameters:
      index - the index of the struct buffer
      Returns:
      the slice of VmaAllocationInfo2
    • asSlice

      public VmaAllocationInfo2 asSlice(long index, long count)
      Creates a slice of VmaAllocationInfo2.
      Parameters:
      index - the index of the struct buffer
      count - the count
      Returns:
      the slice of VmaAllocationInfo2
    • at

      public VmaAllocationInfo2 at(long index, Consumer<VmaAllocationInfo2> func)
      Visits VmaAllocationInfo2 buffer at the given index.
      Parameters:
      index - the index of this buffer
      func - the function to run with the slice of this buffer
      Returns:
      this
    • allocationInfoAt

      public MemorySegment allocationInfoAt(long index)
      Returns allocationInfo at the given index.
      Parameters:
      index - the index of the struct buffer
      Returns:
      allocationInfo at the given index
    • allocationInfoAt

      public VmaAllocationInfo2 allocationInfoAt(long index, MemorySegment value)
      Sets allocationInfo with the given value at the given index.
      Parameters:
      index - the index of the struct buffer
      value - the value
      Returns:
      this
    • allocationInfoAt

      public VmaAllocationInfo2 allocationInfoAt(long index, Consumer<VmaAllocationInfo> func)
      Accepts allocationInfo with the given function.
      Parameters:
      index - the index of the struct buffer
      func - the function
      Returns:
      this
    • blockSizeAt

      public long blockSizeAt(long index)
      Returns blockSize at the given index.
      Parameters:
      index - the index of the struct buffer
      Returns:
      blockSize at the given index
    • blockSizeAt

      public VmaAllocationInfo2 blockSizeAt(long index, long value)
      Sets blockSize with the given value at the given index.
      Parameters:
      index - the index of the struct buffer
      value - the value
      Returns:
      this
    • dedicatedMemoryAt

      public int dedicatedMemoryAt(long index)
      Returns dedicatedMemory at the given index.
      Parameters:
      index - the index of the struct buffer
      Returns:
      dedicatedMemory at the given index
    • dedicatedMemoryAt

      public VmaAllocationInfo2 dedicatedMemoryAt(long index, int value)
      Sets dedicatedMemory with the given value at the given index.
      Parameters:
      index - the index of the struct buffer
      value - the value
      Returns:
      this