Class SpvcMslResourceBinding

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SpvcMslResourceBinding extends Struct<SpvcMslResourceBinding> implements NativeResource

 struct spvc_msl_resource_binding {
     SpvExecutionModel stage;
     unsigned int desc_set;
     unsigned int binding;
     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.
    • 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

    • SpvcMslResourceBinding

      public SpvcMslResourceBinding(ByteBuffer container)
      Creates a SpvcMslResourceBinding 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<SpvcMslResourceBinding>
    • 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.
    • 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 SpvcMslResourceBinding stage(int value)
      Sets the specified value to the stage field.
    • desc_set

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

      public SpvcMslResourceBinding binding(int value)
      Sets the specified value to the binding field.
    • msl_buffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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