Record Class VkSubresourceLayout

java.lang.Object
java.lang.Record
club.doki7.vulkan.datatype.VkSubresourceLayout
All Implemented Interfaces:
IPointer, IVkSubresourceLayout

@ValueBasedCandidate @UnsafeConstructor public record VkSubresourceLayout(@NotNull MemorySegment segment) extends Record implements IVkSubresourceLayout

Represents a pointer to a VkSubresourceLayout structure in native memory.

Structure

typedef struct VkSubresourceLayout {
    VkDeviceSize offset;
    VkDeviceSize size;
    VkDeviceSize rowPitch;
    VkDeviceSize arrayPitch;
    VkDeviceSize depthPitch;
} VkSubresourceLayout;

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$offset

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

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

      public static final MemoryLayout.PathElement PATH$rowPitch
    • PATH$arrayPitch

      public static final MemoryLayout.PathElement PATH$arrayPitch
    • PATH$depthPitch

      public static final MemoryLayout.PathElement PATH$depthPitch
    • LAYOUT$offset

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

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

      public static final ValueLayout.OfLong LAYOUT$rowPitch
    • LAYOUT$arrayPitch

      public static final ValueLayout.OfLong LAYOUT$arrayPitch
    • LAYOUT$depthPitch

      public static final ValueLayout.OfLong LAYOUT$depthPitch
    • SIZE$offset

      public static final long SIZE$offset
    • SIZE$size

      public static final long SIZE$size
    • SIZE$rowPitch

      public static final long SIZE$rowPitch
    • SIZE$arrayPitch

      public static final long SIZE$arrayPitch
    • SIZE$depthPitch

      public static final long SIZE$depthPitch
    • OFFSET$offset

      public static final long OFFSET$offset
    • OFFSET$size

      public static final long OFFSET$size
    • OFFSET$rowPitch

      public static final long OFFSET$rowPitch
    • OFFSET$arrayPitch

      public static final long OFFSET$arrayPitch
    • OFFSET$depthPitch

      public static final long OFFSET$depthPitch
  • Constructor Details

    • VkSubresourceLayout

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