Class VkMemoryRequirements

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

public sealed class VkMemoryRequirements extends GroupType permits VkMemoryRequirements.Buffer

Layout Link icon

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

    • LAYOUT Link icon

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

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

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

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

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

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

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

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

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

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

    • VkMemoryRequirements Link icon

      public VkMemoryRequirements(MemorySegment segment)
      Creates VkMemoryRequirements with the given segment.
      Parameters:
      segment - the memory segment
  • Method Details Link icon

    • of Link icon

      public static VkMemoryRequirements.Buffer 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 Link icon

      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 Link icon

      public static VkMemoryRequirements.Buffer 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 Link icon

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

      public static VkMemoryRequirements.Buffer 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 Link icon

      Copies from the given source.
      Parameters:
      src - the source
      Returns:
      this
    • asBuffer Link icon

      public VkMemoryRequirements.Buffer asBuffer()
      Converts this instance to a buffer.
      Returns:
      the buffer
    • size Link icon

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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

      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 Link icon

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