Class SpvcMslShaderInput

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SpvcMslShaderInput extends Struct<SpvcMslShaderInput> implements NativeResource

 struct spvc_msl_shader_input {
     unsigned location;
     spvc_msl_vertex_format format;
     SpvBuiltIn builtin;
     unsigned vecsize;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • LOCATION

      public static final int LOCATION
      The struct member offsets.
    • FORMAT

      public static final int FORMAT
      The struct member offsets.
    • BUILTIN

      public static final int BUILTIN
      The struct member offsets.
    • VECSIZE

      public static final int VECSIZE
      The struct member offsets.
  • Constructor Details

    • SpvcMslShaderInput

      public SpvcMslShaderInput(ByteBuffer container)
      Creates a SpvcMslShaderInput instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<SpvcMslShaderInput>
    • location

      public int location()
      Returns:
      the value of the location field.
    • format

      public int format()
      Returns:
      the value of the format field.
    • builtin

      public int builtin()
      Returns:
      the value of the builtin field.
    • vecsize

      public int vecsize()
      Returns:
      the value of the vecsize field.
    • location

      public SpvcMslShaderInput location(int value)
      Sets the specified value to the location field.
    • format

      public SpvcMslShaderInput format(int value)
      Sets the specified value to the format field.
    • builtin

      public SpvcMslShaderInput builtin(int value)
      Sets the specified value to the builtin field.
    • vecsize

      public SpvcMslShaderInput vecsize(int value)
      Sets the specified value to the vecsize field.
    • set

      public SpvcMslShaderInput set(int location, int format, int builtin, int vecsize)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static SpvcMslShaderInput malloc()
      Returns a new SpvcMslShaderInput instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static SpvcMslShaderInput calloc()
      Returns a new SpvcMslShaderInput instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static SpvcMslShaderInput create()
      Returns a new SpvcMslShaderInput instance allocated with BufferUtils.
    • create

      public static SpvcMslShaderInput create(long address)
      Returns a new SpvcMslShaderInput instance for the specified memory address.
    • createSafe

      public static @Nullable SpvcMslShaderInput createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static SpvcMslShaderInput.Buffer malloc(int capacity)
      Returns a new SpvcMslShaderInput.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static SpvcMslShaderInput.Buffer calloc(int capacity)
      Returns a new SpvcMslShaderInput.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SpvcMslShaderInput.Buffer create(int capacity)
      Returns a new SpvcMslShaderInput.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SpvcMslShaderInput.Buffer create(long address, int capacity)
      Create a SpvcMslShaderInput.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable SpvcMslShaderInput.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static SpvcMslShaderInput malloc(MemoryStack stack)
      Returns a new SpvcMslShaderInput instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static SpvcMslShaderInput calloc(MemoryStack stack)
      Returns a new SpvcMslShaderInput instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static SpvcMslShaderInput.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SpvcMslShaderInput.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SpvcMslShaderInput.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SpvcMslShaderInput.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nlocation

      public static int nlocation(long struct)
      Unsafe version of location().
    • nformat

      public static int nformat(long struct)
      Unsafe version of format().
    • nbuiltin

      public static int nbuiltin(long struct)
      Unsafe version of builtin().
    • nvecsize

      public static int nvecsize(long struct)
      Unsafe version of vecsize().
    • nlocation

      public static void nlocation(long struct, int value)
      Unsafe version of location.
    • nformat

      public static void nformat(long struct, int value)
      Unsafe version of format.
    • nbuiltin

      public static void nbuiltin(long struct, int value)
      Unsafe version of builtin.
    • nvecsize

      public static void nvecsize(long struct, int value)
      Unsafe version of vecsize.