Top Description Inners Fields Constructors Methods
org.lwjgl.util.spvc

public Class SpvcMslResourceBinding

extends Struct<SpvcMslResourceBinding>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct spvc_msl_resource_binding
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Matches the binding index of a MSL resource for a binding within a descriptor set.

Taken together, the stage, desc_set and binding combine to form a reference to a resource descriptor used in a particular shading stage. If using MSL 2.0 argument buffers, the descriptor set is not marked as a discrete descriptor set, and (for iOS only) the resource is not a storage image (sampled != 2), the binding reference we remap to will become an [[id(N)]] attribute within the "descriptor set" argument buffer structure. For resources which are bound in the "classic" MSL 1.0 way or discrete descriptors, the remap will become a [[buffer(N)]], [[texture(N)]] or [[sampler(N)]] depending on the resource types used.

Layout


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;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BINDING

The struct member offsets.

public static final int
DESC_SET

The struct member offsets.

public static final int
MSL_BUFFER

The struct member offsets.

public static final int
MSL_SAMPLER

The struct member offsets.

public static final int
MSL_TEXTURE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STAGE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
SpvcMslResourceBinding(long address, ByteBuffer container)

public
SpvcMslResourceBinding(ByteBuffer container)

Creates a SpvcMslResourceBinding instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the binding field.
binding
()

public SpvcMslResourceBinding
binding(int value)

Sets the specified value to the binding field.

public static SpvcMslResourceBinding
calloc()

Returns a new SpvcMslResourceBinding instance allocated with memCalloc.

public static SpvcMslResourceBinding.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new SpvcMslResourceBinding.Buffer instance allocated with memCalloc.

public static SpvcMslResourceBinding
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcMslResourceBinding instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static SpvcMslResourceBinding.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected SpvcMslResourceBinding
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static SpvcMslResourceBinding
create()

Returns a new SpvcMslResourceBinding instance allocated with BufferUtils.

public static SpvcMslResourceBinding
create(long address)

Returns a new SpvcMslResourceBinding instance for the specified memory address.

public static SpvcMslResourceBinding.Buffer
create(int
the buffer capacity
capacity
)

Returns a new SpvcMslResourceBinding.Buffer instance allocated with BufferUtils.

public static SpvcMslResourceBinding.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a SpvcMslResourceBinding.Buffer instance at the specified memory.

public static SpvcMslResourceBinding
createSafe(long address)

Like create, but returns null if address is NULL.

public static SpvcMslResourceBinding.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int

Returns:

the value of the desc_set field.
desc_set
()

public SpvcMslResourceBinding
desc_set(int value)

Sets the specified value to the desc_set field.

public static SpvcMslResourceBinding
malloc()

Returns a new SpvcMslResourceBinding instance allocated with memAlloc.

public static SpvcMslResourceBinding.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new SpvcMslResourceBinding.Buffer instance allocated with memAlloc.

public static SpvcMslResourceBinding
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcMslResourceBinding instance allocated on the specified MemoryStack.

public static SpvcMslResourceBinding.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack.

public int

Returns:

the value of the msl_buffer field.
msl_buffer
()

public SpvcMslResourceBinding
msl_buffer(int value)

Sets the specified value to the msl_buffer field.

public int

Returns:

the value of the msl_sampler field.
msl_sampler
()

public SpvcMslResourceBinding
msl_sampler(int value)

Sets the specified value to the msl_sampler field.

public int

Returns:

the value of the msl_texture field.
msl_texture
()

public SpvcMslResourceBinding
msl_texture(int value)

Sets the specified value to the msl_texture field.

public static int
nbinding(long struct)

Unsafe version of binding.

public static void
nbinding(long struct, int value)

Unsafe version of binding.

public static int
ndesc_set(long struct)

Unsafe version of desc_set.

public static void
ndesc_set(long struct, int value)

Unsafe version of desc_set.

public static int
nmsl_buffer(long struct)

Unsafe version of msl_buffer.

public static void
nmsl_buffer(long struct, int value)

Unsafe version of msl_buffer.

public static int
nmsl_sampler(long struct)

Unsafe version of msl_sampler.

public static void
nmsl_sampler(long struct, int value)

Unsafe version of msl_sampler.

public static int
nmsl_texture(long struct)

Unsafe version of msl_texture.

public static void
nmsl_texture(long struct, int value)

Unsafe version of msl_texture.

public static int
nstage(long struct)

Unsafe version of stage.

public static void
nstage(long struct, int value)

Unsafe version of stage.

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.

public SpvcMslResourceBinding

Returns:

this struct
set
(SpvcMslResourceBinding
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int

Returns:

the value of the stage field.
stage
()

public SpvcMslResourceBinding
stage(int value)

Sets the specified value to the stage field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BINDINGback to summary
public static final int BINDING

The struct member offsets.

DESC_SETback to summary
public static final int DESC_SET

The struct member offsets.

MSL_BUFFERback to summary
public static final int MSL_BUFFER

The struct member offsets.

MSL_SAMPLERback to summary
public static final int MSL_SAMPLER

The struct member offsets.

MSL_TEXTUREback to summary
public static final int MSL_TEXTURE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STAGEback to summary
public static final int STAGE

The struct member offsets.

Constructor Detail

SpvcMslResourceBindingback to summary
protected SpvcMslResourceBinding(long address, ByteBuffer container)
SpvcMslResourceBindingback to summary
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 Detail

bindingback to summary
public int binding()
Returns:int

the value of the binding field.

Annotations
@NativeType:unsigned int
bindingback to summary
public SpvcMslResourceBinding binding(int value)

Sets the specified value to the binding field.

callocback to summary
public static SpvcMslResourceBinding calloc()

Returns a new SpvcMslResourceBinding instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static SpvcMslResourceBinding.Buffer calloc(int capacity)

Returns a new SpvcMslResourceBinding.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
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:MemoryStack

the stack from which to allocate

callocback to summary
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:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected SpvcMslResourceBinding create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static SpvcMslResourceBinding create()

Returns a new SpvcMslResourceBinding instance allocated with BufferUtils.

createback to summary
public static SpvcMslResourceBinding create(long address)

Returns a new SpvcMslResourceBinding instance for the specified memory address.

createback to summary
public static SpvcMslResourceBinding.Buffer create(int capacity)

Returns a new SpvcMslResourceBinding.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static SpvcMslResourceBinding.Buffer create(long address, int capacity)

Create a SpvcMslResourceBinding.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static SpvcMslResourceBinding createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static SpvcMslResourceBinding.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
desc_setback to summary
public int desc_set()
Returns:int

the value of the desc_set field.

Annotations
@NativeType:unsigned int
desc_setback to summary
public SpvcMslResourceBinding desc_set(int value)

Sets the specified value to the desc_set field.

mallocback to summary
public static SpvcMslResourceBinding malloc()

Returns a new SpvcMslResourceBinding instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static SpvcMslResourceBinding.Buffer malloc(int capacity)

Returns a new SpvcMslResourceBinding.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static SpvcMslResourceBinding malloc(MemoryStack stack)

Returns a new SpvcMslResourceBinding instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static SpvcMslResourceBinding.Buffer malloc(int capacity, MemoryStack stack)

Returns a new SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

msl_bufferback to summary
public int msl_buffer()
Returns:int

the value of the msl_buffer field.

Annotations
@NativeType:unsigned int
msl_bufferback to summary
public SpvcMslResourceBinding msl_buffer(int value)

Sets the specified value to the msl_buffer field.

msl_samplerback to summary
public int msl_sampler()
Returns:int

the value of the msl_sampler field.

Annotations
@NativeType:unsigned int
msl_samplerback to summary
public SpvcMslResourceBinding msl_sampler(int value)

Sets the specified value to the msl_sampler field.

msl_textureback to summary
public int msl_texture()
Returns:int

the value of the msl_texture field.

Annotations
@NativeType:unsigned int
msl_textureback to summary
public SpvcMslResourceBinding msl_texture(int value)

Sets the specified value to the msl_texture field.

nbindingback to summary
public static int nbinding(long struct)

Unsafe version of binding.

nbindingback to summary
public static void nbinding(long struct, int value)

Unsafe version of binding.

ndesc_setback to summary
public static int ndesc_set(long struct)

Unsafe version of desc_set.

ndesc_setback to summary
public static void ndesc_set(long struct, int value)

Unsafe version of desc_set.

nmsl_bufferback to summary
public static int nmsl_buffer(long struct)

Unsafe version of msl_buffer.

nmsl_bufferback to summary
public static void nmsl_buffer(long struct, int value)

Unsafe version of msl_buffer.

nmsl_samplerback to summary
public static int nmsl_sampler(long struct)

Unsafe version of msl_sampler.

nmsl_samplerback to summary
public static void nmsl_sampler(long struct, int value)

Unsafe version of msl_sampler.

nmsl_textureback to summary
public static int nmsl_texture(long struct)

Unsafe version of msl_texture.

nmsl_textureback to summary
public static void nmsl_texture(long struct, int value)

Unsafe version of msl_texture.

nstageback to summary
public static int nstage(long struct)

Unsafe version of stage.

nstageback to summary
public static void nstage(long struct, int value)

Unsafe version of stage.

setback to summary
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.

setback to summary
public SpvcMslResourceBinding set(SpvcMslResourceBinding src)

Copies the specified struct data to this struct.

Parameters
src:SpvcMslResourceBinding

the source struct

Returns:SpvcMslResourceBinding

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
stageback to summary
public int stage()
Returns:int

the value of the stage field.

Annotations
@NativeType:SpvExecutionModel
stageback to summary
public SpvcMslResourceBinding stage(int value)

Sets the specified value to the stage field.

org.lwjgl.util.spvc back to summary

public Class SpvcMslResourceBinding.Buffer

extends StructBuffer<SpvcMslResourceBinding, SpvcMslResourceBinding.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of SpvcMslResourceBinding structs.

Field Summary

Modifier and TypeField and Description
private static final SpvcMslResourceBinding

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new SpvcMslResourceBinding.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the value of the binding field.
binding
()

public SpvcMslResourceBinding.Buffer
binding(int value)

Sets the specified value to the binding field.

public int

Returns:

the value of the desc_set field.
desc_set
()

public SpvcMslResourceBinding.Buffer
desc_set(int value)

Sets the specified value to the desc_set field.

protected SpvcMslResourceBinding
public int

Returns:

the value of the msl_buffer field.
msl_buffer
()

public SpvcMslResourceBinding.Buffer
msl_buffer(int value)

Sets the specified value to the msl_buffer field.

public int

Returns:

the value of the msl_sampler field.
msl_sampler
()

public SpvcMslResourceBinding.Buffer
msl_sampler(int value)

Sets the specified value to the msl_sampler field.

public int

Returns:

the value of the msl_texture field.
msl_texture
()

public SpvcMslResourceBinding.Buffer
msl_texture(int value)

Sets the specified value to the msl_texture field.

protected SpvcMslResourceBinding.Buffer
public int

Returns:

the value of the stage field.
stage
()

public SpvcMslResourceBinding.Buffer
stage(int value)

Sets the specified value to the stage field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final SpvcMslResourceBinding ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new SpvcMslResourceBinding.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by SpvcMslResourceBinding#SIZEOF, and its mark will be undefined.

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

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

bindingback to summary
public int binding()
Returns:int

the value of the binding field.

Annotations
@NativeType:unsigned int
bindingback to summary
public SpvcMslResourceBinding.Buffer binding(int value)

Sets the specified value to the binding field.

desc_setback to summary
public int desc_set()
Returns:int

the value of the desc_set field.

Annotations
@NativeType:unsigned int
desc_setback to summary
public SpvcMslResourceBinding.Buffer desc_set(int value)

Sets the specified value to the desc_set field.

getElementFactoryback to summary
protected SpvcMslResourceBinding getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
msl_bufferback to summary
public int msl_buffer()
Returns:int

the value of the msl_buffer field.

Annotations
@NativeType:unsigned int
msl_bufferback to summary
public SpvcMslResourceBinding.Buffer msl_buffer(int value)

Sets the specified value to the msl_buffer field.

msl_samplerback to summary
public int msl_sampler()
Returns:int

the value of the msl_sampler field.

Annotations
@NativeType:unsigned int
msl_samplerback to summary
public SpvcMslResourceBinding.Buffer msl_sampler(int value)

Sets the specified value to the msl_sampler field.

msl_textureback to summary
public int msl_texture()
Returns:int

the value of the msl_texture field.

Annotations
@NativeType:unsigned int
msl_textureback to summary
public SpvcMslResourceBinding.Buffer msl_texture(int value)

Sets the specified value to the msl_texture field.

selfback to summary
protected SpvcMslResourceBinding.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
stageback to summary
public int stage()
Returns:int

the value of the stage field.

Annotations
@NativeType:SpvExecutionModel
stageback to summary
public SpvcMslResourceBinding.Buffer stage(int value)

Sets the specified value to the stage field.