Record Class VkShaderResourceUsageAMD

java.lang.Object
java.lang.Record
club.doki7.vulkan.datatype.VkShaderResourceUsageAMD
All Implemented Interfaces:
IPointer, IVkShaderResourceUsageAMD

@ValueBasedCandidate @UnsafeConstructor public record VkShaderResourceUsageAMD(@NotNull MemorySegment segment) extends Record implements IVkShaderResourceUsageAMD

Represents a pointer to a VkShaderResourceUsageAMD structure in native memory.

Structure

typedef struct VkShaderResourceUsageAMD {
    uint32_t numUsedVgprs;
    uint32_t numUsedSgprs;
    uint32_t ldsSizePerLocalWorkGroup;
    size_t ldsUsageSizeInBytes;
    size_t scratchMemUsageInBytes;
} VkShaderResourceUsageAMD;

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

      public static final MemoryLayout.PathElement PATH$numUsedVgprs
    • PATH$numUsedSgprs

      public static final MemoryLayout.PathElement PATH$numUsedSgprs
    • PATH$ldsSizePerLocalWorkGroup

      public static final MemoryLayout.PathElement PATH$ldsSizePerLocalWorkGroup
    • PATH$ldsUsageSizeInBytes

      public static final MemoryLayout.PathElement PATH$ldsUsageSizeInBytes
    • PATH$scratchMemUsageInBytes

      public static final MemoryLayout.PathElement PATH$scratchMemUsageInBytes
    • LAYOUT$numUsedVgprs

      public static final ValueLayout.OfInt LAYOUT$numUsedVgprs
    • LAYOUT$numUsedSgprs

      public static final ValueLayout.OfInt LAYOUT$numUsedSgprs
    • LAYOUT$ldsSizePerLocalWorkGroup

      public static final ValueLayout.OfInt LAYOUT$ldsSizePerLocalWorkGroup
    • SIZE$numUsedVgprs

      public static final long SIZE$numUsedVgprs
    • SIZE$numUsedSgprs

      public static final long SIZE$numUsedSgprs
    • SIZE$ldsSizePerLocalWorkGroup

      public static final long SIZE$ldsSizePerLocalWorkGroup
    • SIZE$ldsUsageSizeInBytes

      public static final long SIZE$ldsUsageSizeInBytes
    • SIZE$scratchMemUsageInBytes

      public static final long SIZE$scratchMemUsageInBytes
    • OFFSET$numUsedVgprs

      public static final long OFFSET$numUsedVgprs
    • OFFSET$numUsedSgprs

      public static final long OFFSET$numUsedSgprs
    • OFFSET$ldsSizePerLocalWorkGroup

      public static final long OFFSET$ldsSizePerLocalWorkGroup
    • OFFSET$ldsUsageSizeInBytes

      public static final long OFFSET$ldsUsageSizeInBytes
    • OFFSET$scratchMemUsageInBytes

      public static final long OFFSET$scratchMemUsageInBytes
  • Constructor Details

    • VkShaderResourceUsageAMD

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

    • allocate

      public static VkShaderResourceUsageAMD allocate(Arena arena)
    • allocate

      public static VkShaderResourceUsageAMD.Ptr allocate(Arena arena, long count)
    • clone

      public static VkShaderResourceUsageAMD clone(Arena arena, VkShaderResourceUsageAMD src)
    • numUsedVgprs

      @Unsigned public int numUsedVgprs()
    • numUsedVgprs

      public VkShaderResourceUsageAMD numUsedVgprs(@Unsigned int value)
    • numUsedSgprs

      @Unsigned public int numUsedSgprs()
    • numUsedSgprs

      public VkShaderResourceUsageAMD numUsedSgprs(@Unsigned int value)
    • ldsSizePerLocalWorkGroup

      @Unsigned public int ldsSizePerLocalWorkGroup()
    • ldsSizePerLocalWorkGroup

      public VkShaderResourceUsageAMD ldsSizePerLocalWorkGroup(@Unsigned int value)
    • ldsUsageSizeInBytes

      @Unsigned public long ldsUsageSizeInBytes()
    • ldsUsageSizeInBytes

      public VkShaderResourceUsageAMD ldsUsageSizeInBytes(@Unsigned long value)
    • scratchMemUsageInBytes

      @Unsigned public long scratchMemUsageInBytes()
    • scratchMemUsageInBytes

      public VkShaderResourceUsageAMD scratchMemUsageInBytes(@Unsigned long value)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • segment

      @NotNull public @NotNull MemorySegment segment()
      Returns the value of the segment record component.
      Specified by:
      segment in interface IPointer
      Returns:
      the value of the segment record component