Record Class WGPUShaderSourceSpirv

java.lang.Object
java.lang.Record
club.doki7.webgpu.datatype.WGPUShaderSourceSpirv
All Implemented Interfaces:
IPointer, IWGPUShaderSourceSpirv

@ValueBasedCandidate @UnsafeConstructor public record WGPUShaderSourceSpirv(@NotNull MemorySegment segment) extends Record implements IWGPUShaderSourceSpirv

Represents a pointer to a WGPUShaderSourceSpirv structure in native memory.

Structure

typedef struct WGPUShaderSourceSpirv {
    WGPUChainedStruct chain;
    uint32_t codeSize;
    uint32_t const* code;
} WGPUShaderSourceSpirv;

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.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$chain

      public static final MemoryLayout.PathElement PATH$chain
    • PATH$codeSize

      public static final MemoryLayout.PathElement PATH$codeSize
    • PATH$code

      public static final MemoryLayout.PathElement PATH$code
    • LAYOUT$chain

      public static final StructLayout LAYOUT$chain
    • LAYOUT$codeSize

      public static final ValueLayout.OfInt LAYOUT$codeSize
    • LAYOUT$code

      public static final AddressLayout LAYOUT$code
    • SIZE$chain

      public static final long SIZE$chain
    • SIZE$codeSize

      public static final long SIZE$codeSize
    • SIZE$code

      public static final long SIZE$code
    • OFFSET$chain

      public static final long OFFSET$chain
    • OFFSET$codeSize

      public static final long OFFSET$codeSize
    • OFFSET$code

      public static final long OFFSET$code
  • Constructor Details

    • WGPUShaderSourceSpirv

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