Class SpvcMslResourceBinding2

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SpvcMslResourceBinding2 extends Struct<SpvcMslResourceBinding2> implements NativeResource

 struct spvc_msl_resource_binding_2 {
     SpvExecutionModel stage;
     unsigned int desc_set;
     unsigned int binding;
     unsigned int count;
     unsigned int msl_buffer;
     unsigned int msl_texture;
     unsigned int msl_sampler;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int STAGE
      The struct member offsets.
    • DESC_SET

      public static final int DESC_SET
      The struct member offsets.
    • BINDING

      public static final int BINDING
      The struct member offsets.
    • COUNT

      public static final int COUNT
      The struct member offsets.
    • MSL_BUFFER

      public static final int MSL_BUFFER
      The struct member offsets.
    • MSL_TEXTURE

      public static final int MSL_TEXTURE
      The struct member offsets.
    • MSL_SAMPLER

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

    • SpvcMslResourceBinding2

      public SpvcMslResourceBinding2(ByteBuffer container)
      Creates a SpvcMslResourceBinding2 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<SpvcMslResourceBinding2>
    • stage

      public int stage()
      Returns:
      the value of the stage field.
    • desc_set

      public int desc_set()
      Returns:
      the value of the desc_set field.
    • binding

      public int binding()
      Returns:
      the value of the binding field.
    • count

      public int count()
      Returns:
      the value of the count field.
    • msl_buffer

      public int msl_buffer()
      Returns:
      the value of the msl_buffer field.
    • msl_texture

      public int msl_texture()
      Returns:
      the value of the msl_texture field.
    • msl_sampler

      public int msl_sampler()
      Returns:
      the value of the msl_sampler field.
    • stage

      public SpvcMslResourceBinding2 stage(int value)
      Sets the specified value to the stage field.
    • desc_set

      public SpvcMslResourceBinding2 desc_set(int value)
      Sets the specified value to the desc_set field.
    • binding

      public SpvcMslResourceBinding2 binding(int value)
      Sets the specified value to the binding field.
    • count

      public SpvcMslResourceBinding2 count(int value)
      Sets the specified value to the count field.
    • msl_buffer

      public SpvcMslResourceBinding2 msl_buffer(int value)
      Sets the specified value to the msl_buffer field.
    • msl_texture

      public SpvcMslResourceBinding2 msl_texture(int value)
      Sets the specified value to the msl_texture field.
    • msl_sampler

      public SpvcMslResourceBinding2 msl_sampler(int value)
      Sets the specified value to the msl_sampler field.
    • set

      public SpvcMslResourceBinding2 set(int stage, int desc_set, int binding, int count, int msl_buffer, int msl_texture, int msl_sampler)
      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 SpvcMslResourceBinding2 malloc()
      Returns a new SpvcMslResourceBinding2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static SpvcMslResourceBinding2.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SpvcMslResourceBinding2.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
    • nstage

      public static int nstage(long struct)
      Unsafe version of stage().
    • ndesc_set

      public static int ndesc_set(long struct)
      Unsafe version of desc_set().
    • nbinding

      public static int nbinding(long struct)
      Unsafe version of binding().
    • ncount

      public static int ncount(long struct)
      Unsafe version of count().
    • nmsl_buffer

      public static int nmsl_buffer(long struct)
      Unsafe version of msl_buffer().
    • nmsl_texture

      public static int nmsl_texture(long struct)
      Unsafe version of msl_texture().
    • nmsl_sampler

      public static int nmsl_sampler(long struct)
      Unsafe version of msl_sampler().
    • nstage

      public static void nstage(long struct, int value)
      Unsafe version of stage.
    • ndesc_set

      public static void ndesc_set(long struct, int value)
      Unsafe version of desc_set.
    • nbinding

      public static void nbinding(long struct, int value)
      Unsafe version of binding.
    • ncount

      public static void ncount(long struct, int value)
      Unsafe version of count.
    • nmsl_buffer

      public static void nmsl_buffer(long struct, int value)
      Unsafe version of msl_buffer.
    • nmsl_texture

      public static void nmsl_texture(long struct, int value)
      Unsafe version of msl_texture.
    • nmsl_sampler

      public static void nmsl_sampler(long struct, int value)
      Unsafe version of msl_sampler.