Class VkSparseImageMemoryBind

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

public sealed class VkSparseImageMemoryBind extends GroupType permits VkSparseImageMemoryBind.Buffer

Layout

struct VkSparseImageMemoryBind {
    (struct VkImageSubresource) VkImageSubresource subresource;
    (struct VkOffset3D) VkOffset3D offset;
    (struct VkExtent3D) VkExtent3D extent;
    (uint64_t) VkDeviceMemory memory;
    (uint64_t) VkDeviceSize memoryOffset;
    ((uint32_t) VkFlags) VkSparseMemoryBindFlags flags;
};
  • Field Details

    • LAYOUT

      public static final GroupLayout LAYOUT
      The struct layout of VkSparseImageMemoryBind.
    • OFFSET_subresource

      public static final long OFFSET_subresource
      The byte offset of subresource.
    • LAYOUT_subresource

      public static final MemoryLayout LAYOUT_subresource
      The memory layout of subresource.
    • OFFSET_offset

      public static final long OFFSET_offset
      The byte offset of offset.
    • LAYOUT_offset

      public static final MemoryLayout LAYOUT_offset
      The memory layout of offset.
    • OFFSET_extent

      public static final long OFFSET_extent
      The byte offset of extent.
    • LAYOUT_extent

      public static final MemoryLayout LAYOUT_extent
      The memory layout of extent.
    • OFFSET_memory

      public static final long OFFSET_memory
      The byte offset of memory.
    • LAYOUT_memory

      public static final MemoryLayout LAYOUT_memory
      The memory layout of memory.
    • VH_memory

      public static final VarHandle VH_memory
      The VarHandle of memory of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_memoryOffset

      public static final long OFFSET_memoryOffset
      The byte offset of memoryOffset.
    • LAYOUT_memoryOffset

      public static final MemoryLayout LAYOUT_memoryOffset
      The memory layout of memoryOffset.
    • VH_memoryOffset

      public static final VarHandle VH_memoryOffset
      The VarHandle of memoryOffset of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_flags

      public static final long OFFSET_flags
      The byte offset of flags.
    • LAYOUT_flags

      public static final MemoryLayout LAYOUT_flags
      The memory layout of flags.
    • VH_flags

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

    • VkSparseImageMemoryBind

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

    • of

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

      public static VkSparseImageMemoryBind ofNative(MemorySegment segment)

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

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

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

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

      public VkSparseImageMemoryBind.Buffer asBuffer()
      Converts this instance to a buffer.
      Returns:
      the buffer
    • subresource

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

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

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

      public VkSparseImageMemoryBind subresource(MemorySegment value)
      Sets subresource with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • offset

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

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

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

      public VkSparseImageMemoryBind offset(MemorySegment value)
      Sets offset with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • extent

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

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

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

      public VkSparseImageMemoryBind extent(MemorySegment value)
      Sets extent with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • memory

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

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

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

      public VkSparseImageMemoryBind memory(long value)
      Sets memory with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • memoryOffset

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

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

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

      public VkSparseImageMemoryBind memoryOffset(long value)
      Sets memoryOffset with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • flags

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

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

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

      public VkSparseImageMemoryBind flags(int value)
      Sets flags with the given value.
      Parameters:
      value - the value
      Returns:
      this