Class VkMemoryRequirements

java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.struct.VkMemoryRequirements
All Implemented Interfaces:
Addressable

public final class VkMemoryRequirements extends GroupType

Layout

struct VkMemoryRequirements {
    (uint64_t) VkDeviceSize size;
    (uint64_t) VkDeviceSize alignment;
    uint32_t memoryTypeBits;
};
  • Field Details

    • LAYOUT

      public static final GroupLayout LAYOUT
      The struct layout of VkMemoryRequirements.
    • OFFSET_size

      public static final long OFFSET_size
      The byte offset of size.
    • LAYOUT_size

      public static final MemoryLayout LAYOUT_size
      The memory layout of size.
    • VH_size

      public static final VarHandle VH_size
      The VarHandle of size of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_alignment

      public static final long OFFSET_alignment
      The byte offset of alignment.
    • LAYOUT_alignment

      public static final MemoryLayout LAYOUT_alignment
      The memory layout of alignment.
    • VH_alignment

      public static final VarHandle VH_alignment
      The VarHandle of alignment of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_memoryTypeBits

      public static final long OFFSET_memoryTypeBits
      The byte offset of memoryTypeBits.
    • LAYOUT_memoryTypeBits

      public static final MemoryLayout LAYOUT_memoryTypeBits
      The memory layout of memoryTypeBits.
    • VH_memoryTypeBits

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

    • VkMemoryRequirements

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

    • of

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

      public static VkMemoryRequirements ofNative(MemorySegment segment)

      Creates VkMemoryRequirements 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 VkMemoryRequirements ofNative(MemorySegment segment, long count)

      Creates VkMemoryRequirements 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 VkMemoryRequirements alloc(SegmentAllocator allocator)
      Allocates a VkMemoryRequirements with the given segment allocator.
      Parameters:
      allocator - the segment allocator
      Returns:
      the allocated VkMemoryRequirements
    • alloc

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

      Copies from the given source.
      Parameters:
      src - the source
      Returns:
      this
    • reinterpret

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

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

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

      public static void size(MemorySegment segment, long index, long value)
      Sets size 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
    • size

      public VkMemoryRequirements size(long value)
      Sets size with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • alignment

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

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

      public static void alignment(MemorySegment segment, long index, long value)
      Sets alignment 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
    • alignment

      public VkMemoryRequirements alignment(long value)
      Sets alignment with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • memoryTypeBits

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

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

      public static void memoryTypeBits(MemorySegment segment, long index, int value)
      Sets memoryTypeBits 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
    • memoryTypeBits

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

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

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

      public VkMemoryRequirements at(long index, Consumer<VkMemoryRequirements> func)
      Visits VkMemoryRequirements 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
    • sizeAt

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

      public VkMemoryRequirements sizeAt(long index, long value)
      Sets size with the given value at the given index.
      Parameters:
      index - the index of the struct buffer
      value - the value
      Returns:
      this
    • alignmentAt

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

      public VkMemoryRequirements alignmentAt(long index, long value)
      Sets alignment with the given value at the given index.
      Parameters:
      index - the index of the struct buffer
      value - the value
      Returns:
      this
    • memoryTypeBitsAt

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

      public VkMemoryRequirements memoryTypeBitsAt(long index, int value)
      Sets memoryTypeBits with the given value at the given index.
      Parameters:
      index - the index of the struct buffer
      value - the value
      Returns:
      this