public class SpvcMslResourceBinding
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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.
struct SpvcMslResourceBinding {
SpvExecutionModel stage;
unsigned int desc_set;
unsigned int binding;
unsigned int msl_buffer;
unsigned int msl_texture;
unsigned int msl_sampler;
}| Modifier and Type | Class and Description |
|---|---|
static class |
SpvcMslResourceBinding.Buffer
An array of
SpvcMslResourceBinding structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BINDING
The struct member offsets.
|
static int |
DESC_SET
The struct member offsets.
|
static int |
MSL_BUFFER
The struct member offsets.
|
static int |
MSL_SAMPLER
The struct member offsets.
|
static int |
MSL_TEXTURE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STAGE
The struct member offsets.
|
| Constructor and Description |
|---|
SpvcMslResourceBinding(java.nio.ByteBuffer container)
Creates a
SpvcMslResourceBinding instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
int |
binding()
Returns the value of the
binding field. |
SpvcMslResourceBinding |
binding(int value)
Sets the specified value to the
binding field. |
static SpvcMslResourceBinding |
calloc()
Returns a new
SpvcMslResourceBinding instance allocated with memCalloc. |
static SpvcMslResourceBinding.Buffer |
calloc(int capacity)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated with memCalloc. |
static SpvcMslResourceBinding |
callocStack()
Returns a new
SpvcMslResourceBinding instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static SpvcMslResourceBinding.Buffer |
callocStack(int capacity)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static SpvcMslResourceBinding.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static SpvcMslResourceBinding |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcMslResourceBinding instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static SpvcMslResourceBinding |
create()
Returns a new
SpvcMslResourceBinding instance allocated with BufferUtils. |
static SpvcMslResourceBinding.Buffer |
create(int capacity)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated with BufferUtils. |
static SpvcMslResourceBinding |
create(long address)
Returns a new
SpvcMslResourceBinding instance for the specified memory address. |
static SpvcMslResourceBinding.Buffer |
create(long address,
int capacity)
Create a
SpvcMslResourceBinding.Buffer instance at the specified memory. |
static SpvcMslResourceBinding |
createSafe(long address)
|
static SpvcMslResourceBinding.Buffer |
createSafe(long address,
int capacity)
|
int |
desc_set()
Returns the value of the
desc_set field. |
SpvcMslResourceBinding |
desc_set(int value)
Sets the specified value to the
desc_set field. |
static SpvcMslResourceBinding |
malloc()
Returns a new
SpvcMslResourceBinding instance allocated with memAlloc. |
static SpvcMslResourceBinding.Buffer |
malloc(int capacity)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated with memAlloc. |
static SpvcMslResourceBinding |
mallocStack()
Returns a new
SpvcMslResourceBinding instance allocated on the thread-local MemoryStack. |
static SpvcMslResourceBinding.Buffer |
mallocStack(int capacity)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated on the thread-local MemoryStack. |
static SpvcMslResourceBinding.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack. |
static SpvcMslResourceBinding |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcMslResourceBinding instance allocated on the specified MemoryStack. |
int |
msl_buffer()
Returns the value of the
msl_buffer field. |
SpvcMslResourceBinding |
msl_buffer(int value)
Sets the specified value to the
msl_buffer field. |
int |
msl_sampler()
Returns the value of the
msl_sampler field. |
SpvcMslResourceBinding |
msl_sampler(int value)
Sets the specified value to the
msl_sampler field. |
int |
msl_texture()
Returns the value of the
msl_texture field. |
SpvcMslResourceBinding |
msl_texture(int value)
Sets the specified value to the
msl_texture field. |
static int |
nbinding(long struct)
Unsafe version of
binding(). |
static void |
nbinding(long struct,
int value)
Unsafe version of
binding. |
static int |
ndesc_set(long struct)
Unsafe version of
desc_set(). |
static void |
ndesc_set(long struct,
int value)
Unsafe version of
desc_set. |
static int |
nmsl_buffer(long struct)
Unsafe version of
msl_buffer(). |
static void |
nmsl_buffer(long struct,
int value)
Unsafe version of
msl_buffer. |
static int |
nmsl_sampler(long struct)
Unsafe version of
msl_sampler(). |
static void |
nmsl_sampler(long struct,
int value)
Unsafe version of
msl_sampler. |
static int |
nmsl_texture(long struct)
Unsafe version of
msl_texture(). |
static void |
nmsl_texture(long struct,
int value)
Unsafe version of
msl_texture. |
static int |
nstage(long struct)
Unsafe version of
stage(). |
static void |
nstage(long struct,
int value)
Unsafe version of
stage. |
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.
|
SpvcMslResourceBinding |
set(SpvcMslResourceBinding src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
stage()
Returns the value of the
stage field. |
SpvcMslResourceBinding |
stage(int value)
Sets the specified value to the
stage field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STAGE
public static final int DESC_SET
public static final int BINDING
public static final int MSL_BUFFER
public static final int MSL_TEXTURE
public static final int MSL_SAMPLER
public SpvcMslResourceBinding(java.nio.ByteBuffer container)
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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int stage()
stage field.public int desc_set()
desc_set field.public int binding()
binding field.public int msl_buffer()
msl_buffer field.public int msl_texture()
msl_texture field.public int msl_sampler()
msl_sampler field.public SpvcMslResourceBinding stage(int value)
stage field.public SpvcMslResourceBinding desc_set(int value)
desc_set field.public SpvcMslResourceBinding binding(int value)
binding field.public SpvcMslResourceBinding msl_buffer(int value)
msl_buffer field.public SpvcMslResourceBinding msl_texture(int value)
msl_texture field.public SpvcMslResourceBinding msl_sampler(int value)
msl_sampler field.public SpvcMslResourceBinding set(int stage, int desc_set, int binding, int msl_buffer, int msl_texture, int msl_sampler)
public SpvcMslResourceBinding set(SpvcMslResourceBinding src)
src - the source structpublic static SpvcMslResourceBinding malloc()
SpvcMslResourceBinding instance allocated with memAlloc. The instance must be explicitly freed.public static SpvcMslResourceBinding calloc()
SpvcMslResourceBinding instance allocated with memCalloc. The instance must be explicitly freed.public static SpvcMslResourceBinding create()
SpvcMslResourceBinding instance allocated with BufferUtils.public static SpvcMslResourceBinding create(long address)
SpvcMslResourceBinding instance for the specified memory address.@Nullable public static SpvcMslResourceBinding createSafe(long address)
public static SpvcMslResourceBinding.Buffer malloc(int capacity)
SpvcMslResourceBinding.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static SpvcMslResourceBinding.Buffer calloc(int capacity)
SpvcMslResourceBinding.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static SpvcMslResourceBinding.Buffer create(int capacity)
SpvcMslResourceBinding.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static SpvcMslResourceBinding.Buffer create(long address, int capacity)
SpvcMslResourceBinding.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static SpvcMslResourceBinding.Buffer createSafe(long address, int capacity)
public static SpvcMslResourceBinding mallocStack()
SpvcMslResourceBinding instance allocated on the thread-local MemoryStack.public static SpvcMslResourceBinding callocStack()
SpvcMslResourceBinding instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static SpvcMslResourceBinding mallocStack(org.lwjgl.system.MemoryStack stack)
SpvcMslResourceBinding instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static SpvcMslResourceBinding callocStack(org.lwjgl.system.MemoryStack stack)
SpvcMslResourceBinding instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static SpvcMslResourceBinding.Buffer mallocStack(int capacity)
SpvcMslResourceBinding.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static SpvcMslResourceBinding.Buffer callocStack(int capacity)
SpvcMslResourceBinding.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static SpvcMslResourceBinding.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static SpvcMslResourceBinding.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
SpvcMslResourceBinding.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nstage(long struct)
stage().public static int ndesc_set(long struct)
desc_set().public static int nbinding(long struct)
binding().public static int nmsl_buffer(long struct)
msl_buffer().public static int nmsl_texture(long struct)
msl_texture().public static int nmsl_sampler(long struct)
msl_sampler().public static void nstage(long struct,
int value)
stage.public static void ndesc_set(long struct,
int value)
desc_set.public static void nbinding(long struct,
int value)
binding.public static void nmsl_buffer(long struct,
int value)
msl_buffer.public static void nmsl_texture(long struct,
int value)
msl_texture.public static void nmsl_sampler(long struct,
int value)
msl_sampler.Copyright LWJGL. All Rights Reserved. License terms.