Class SpvcMslShaderInterfaceVar

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<SpvcMslShaderInterfaceVar>
org.lwjgl.util.spvc.SpvcMslShaderInterfaceVar
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class SpvcMslShaderInterfaceVar extends org.lwjgl.system.Struct<SpvcMslShaderInterfaceVar> implements org.lwjgl.system.NativeResource
Defines MSL characteristics of an input variable at a particular location.

After compilation, it is possible to query whether or not this location was used. If vecsize is nonzero, it must be greater than or equal to the vecsize declared in the shader, or behavior is undefined.

Deprecated; use spvc_msl_shader_interface_var_2.

Layout


 struct spvc_msl_shader_interface_var {
     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

    • SpvcMslShaderInterfaceVar

      public SpvcMslShaderInterfaceVar(ByteBuffer container)
      Creates a SpvcMslShaderInterfaceVar 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<SpvcMslShaderInterfaceVar>
    • 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 SpvcMslShaderInterfaceVar location(int value)
      Sets the specified value to the location field.
    • format

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

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

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

      public SpvcMslShaderInterfaceVar 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 SpvcMslShaderInterfaceVar malloc()
      Returns a new SpvcMslShaderInterfaceVar instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static SpvcMslShaderInterfaceVar.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new SpvcMslShaderInterfaceVar.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.