Record Class VkSparseMemoryBind

java.lang.Object
java.lang.Record
club.doki7.vulkan.datatype.VkSparseMemoryBind
All Implemented Interfaces:
IPointer, IVkSparseMemoryBind

@ValueBasedCandidate @UnsafeConstructor public record VkSparseMemoryBind(@NotNull MemorySegment segment) extends Record implements IVkSparseMemoryBind

Represents a pointer to a VkSparseMemoryBind structure in native memory.

Structure

typedef struct VkSparseMemoryBind {
    VkDeviceSize resourceOffset;
    VkDeviceSize size;
    VkDeviceMemory memory; // optional
    VkDeviceSize memoryOffset;
    VkSparseMemoryBindFlags flags; // optional
} VkSparseMemoryBind;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.

See Also:
  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$resourceOffset

      public static final MemoryLayout.PathElement PATH$resourceOffset
    • PATH$size

      public static final MemoryLayout.PathElement PATH$size
    • PATH$memory

      public static final MemoryLayout.PathElement PATH$memory
    • PATH$memoryOffset

      public static final MemoryLayout.PathElement PATH$memoryOffset
    • PATH$flags

      public static final MemoryLayout.PathElement PATH$flags
    • LAYOUT$resourceOffset

      public static final ValueLayout.OfLong LAYOUT$resourceOffset
    • LAYOUT$size

      public static final ValueLayout.OfLong LAYOUT$size
    • LAYOUT$memory

      public static final AddressLayout LAYOUT$memory
    • LAYOUT$memoryOffset

      public static final ValueLayout.OfLong LAYOUT$memoryOffset
    • LAYOUT$flags

      public static final ValueLayout.OfInt LAYOUT$flags
    • SIZE$resourceOffset

      public static final long SIZE$resourceOffset
    • SIZE$size

      public static final long SIZE$size
    • SIZE$memory

      public static final long SIZE$memory
    • SIZE$memoryOffset

      public static final long SIZE$memoryOffset
    • SIZE$flags

      public static final long SIZE$flags
    • OFFSET$resourceOffset

      public static final long OFFSET$resourceOffset
    • OFFSET$size

      public static final long OFFSET$size
    • OFFSET$memory

      public static final long OFFSET$memory
    • OFFSET$memoryOffset

      public static final long OFFSET$memoryOffset
    • OFFSET$flags

      public static final long OFFSET$flags
  • Constructor Details

    • VkSparseMemoryBind

      public VkSparseMemoryBind(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a VkSparseMemoryBind record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details