Class VmaAllocationInfo2

java.lang.Object
overrungl.struct.GroupType
overrungl.vma.VmaAllocationInfo2
All Implemented Interfaces:
Addressable
Direct Known Subclasses:
VmaAllocationInfo2.Buffer

public sealed class VmaAllocationInfo2 extends GroupType permits VmaAllocationInfo2.Buffer

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)
      Creates VmaAllocationInfo2 with the given segment.
      Parameters:
      segment - the memory segment
  • Method Details

    • of

      public static VmaAllocationInfo2.Buffer 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.Buffer 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.Buffer 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
    • allocInit

      public static VmaAllocationInfo2 allocInit(SegmentAllocator allocator, MemorySegment allocationInfo, long blockSize, int dedicatedMemory)
      Allocates a VmaAllocationInfo2 with the given segment allocator and arguments like initializer list.
      Parameters:
      allocator - the segment allocator
      allocationInfo - allocationInfo
      blockSize - blockSize
      dedicatedMemory - dedicatedMemory
      Returns:
      the allocated VmaAllocationInfo2
    • allocInit

      public static VmaAllocationInfo2 allocInit(SegmentAllocator allocator, MemorySegment allocationInfo, long blockSize)
      Allocates a VmaAllocationInfo2 with the given segment allocator and arguments like initializer list.
      Parameters:
      allocator - the segment allocator
      allocationInfo - allocationInfo
      blockSize - blockSize
      Returns:
      the allocated VmaAllocationInfo2
    • allocInit

      public static VmaAllocationInfo2 allocInit(SegmentAllocator allocator, MemorySegment allocationInfo)
      Allocates a VmaAllocationInfo2 with the given segment allocator and arguments like initializer list.
      Parameters:
      allocator - the segment allocator
      allocationInfo - allocationInfo
      Returns:
      the allocated VmaAllocationInfo2
    • copyFrom

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

      public VmaAllocationInfo2.Buffer asBuffer()
      Converts this instance to a buffer.
      Returns:
      the 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
    • 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