public class SpvcReflectedResource
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
id – Resources are identified with their SPIR-V ID. This is the ID of the OpVariable.base_type_id –
The base type of the declared resource.
This type is the base type which ignores pointers and arrays of the type_id. This is mostly useful to parse decorations of the underlying
type. base_type_id can also be obtained with get_type(get_type(type_id).self).
type_id –
The type ID of the variable which includes arrays and all type modifications.
This type ID is not suitable for parsing OpMemberDecoration of a struct and other decorations in general since these modifications typically
happen on the base_type_id.
name –
The declared name (OpName) of the resource.
For Buffer blocks, the name actually reflects the externally visible Block name. This name can be retrieved again by using either
get_name(id) or get_name(base_type_id) depending if it's a buffer block or not. This name can be an empty string in which case
get_fallback_name(id) can be used which obtains a suitable fallback identifier for an ID.
struct SpvcReflectedResource {
spvc_variable_id id;
spvc_type_id base_type_id;
spvc_type_id type_id;
char const * name;
}| Modifier and Type | Class and Description |
|---|---|
static class |
SpvcReflectedResource.Buffer
An array of
SpvcReflectedResource structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BASE_TYPE_ID
The struct member offsets.
|
static int |
ID
The struct member offsets.
|
static int |
NAME
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TYPE_ID
The struct member offsets.
|
| Constructor and Description |
|---|
SpvcReflectedResource(java.nio.ByteBuffer container)
Creates a
SpvcReflectedResource instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
int |
base_type_id()
Returns the value of the
base_type_id field. |
SpvcReflectedResource |
base_type_id(int value)
Sets the specified value to the
base_type_id field. |
static SpvcReflectedResource |
calloc()
Returns a new
SpvcReflectedResource instance allocated with memCalloc. |
static SpvcReflectedResource.Buffer |
calloc(int capacity)
Returns a new
SpvcReflectedResource.Buffer instance allocated with memCalloc. |
static SpvcReflectedResource |
callocStack()
Returns a new
SpvcReflectedResource instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static SpvcReflectedResource.Buffer |
callocStack(int capacity)
Returns a new
SpvcReflectedResource.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static SpvcReflectedResource.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcReflectedResource.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static SpvcReflectedResource |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcReflectedResource instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static SpvcReflectedResource |
create()
Returns a new
SpvcReflectedResource instance allocated with BufferUtils. |
static SpvcReflectedResource.Buffer |
create(int capacity)
Returns a new
SpvcReflectedResource.Buffer instance allocated with BufferUtils. |
static SpvcReflectedResource |
create(long address)
Returns a new
SpvcReflectedResource instance for the specified memory address. |
static SpvcReflectedResource.Buffer |
create(long address,
int capacity)
Create a
SpvcReflectedResource.Buffer instance at the specified memory. |
static SpvcReflectedResource |
createSafe(long address)
|
static SpvcReflectedResource.Buffer |
createSafe(long address,
int capacity)
|
int |
id()
Returns the value of the
id field. |
SpvcReflectedResource |
id(int value)
Sets the specified value to the
id field. |
static SpvcReflectedResource |
malloc()
Returns a new
SpvcReflectedResource instance allocated with memAlloc. |
static SpvcReflectedResource.Buffer |
malloc(int capacity)
Returns a new
SpvcReflectedResource.Buffer instance allocated with memAlloc. |
static SpvcReflectedResource |
mallocStack()
Returns a new
SpvcReflectedResource instance allocated on the thread-local MemoryStack. |
static SpvcReflectedResource.Buffer |
mallocStack(int capacity)
Returns a new
SpvcReflectedResource.Buffer instance allocated on the thread-local MemoryStack. |
static SpvcReflectedResource.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcReflectedResource.Buffer instance allocated on the specified MemoryStack. |
static SpvcReflectedResource |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
SpvcReflectedResource instance allocated on the specified MemoryStack. |
java.nio.ByteBuffer |
name()
Returns a
ByteBuffer view of the null-terminated string pointed to by the name field. |
SpvcReflectedResource |
name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
name field. |
java.lang.String |
nameString()
Decodes the null-terminated string pointed to by the
name field. |
static int |
nbase_type_id(long struct)
Unsafe version of
base_type_id(). |
static void |
nbase_type_id(long struct,
int value)
Unsafe version of
base_type_id. |
static int |
nid(long struct)
Unsafe version of
id(). |
static void |
nid(long struct,
int value)
Unsafe version of
id. |
static java.nio.ByteBuffer |
nname(long struct)
Unsafe version of
name(). |
static void |
nname(long struct,
java.nio.ByteBuffer value)
Unsafe version of
name. |
static java.lang.String |
nnameString(long struct)
Unsafe version of
nameString(). |
static int |
ntype_id(long struct)
Unsafe version of
type_id(). |
static void |
ntype_id(long struct,
int value)
Unsafe version of
type_id. |
SpvcReflectedResource |
set(int id,
int base_type_id,
int type_id,
java.nio.ByteBuffer name)
Initializes this struct with the specified values.
|
SpvcReflectedResource |
set(SpvcReflectedResource src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
type_id()
Returns the value of the
type_id field. |
SpvcReflectedResource |
type_id(int value)
Sets the specified value to the
type_id field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int ID
public static final int BASE_TYPE_ID
public static final int TYPE_ID
public static final int NAME
public SpvcReflectedResource(java.nio.ByteBuffer container)
SpvcReflectedResource 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 id()
id field.public int base_type_id()
base_type_id field.public int type_id()
type_id field.public java.nio.ByteBuffer name()
ByteBuffer view of the null-terminated string pointed to by the name field.public java.lang.String nameString()
name field.public SpvcReflectedResource id(int value)
id field.public SpvcReflectedResource base_type_id(int value)
base_type_id field.public SpvcReflectedResource type_id(int value)
type_id field.public SpvcReflectedResource name(java.nio.ByteBuffer value)
name field.public SpvcReflectedResource set(int id, int base_type_id, int type_id, java.nio.ByteBuffer name)
public SpvcReflectedResource set(SpvcReflectedResource src)
src - the source structpublic static SpvcReflectedResource malloc()
SpvcReflectedResource instance allocated with memAlloc. The instance must be explicitly freed.public static SpvcReflectedResource calloc()
SpvcReflectedResource instance allocated with memCalloc. The instance must be explicitly freed.public static SpvcReflectedResource create()
SpvcReflectedResource instance allocated with BufferUtils.public static SpvcReflectedResource create(long address)
SpvcReflectedResource instance for the specified memory address.@Nullable public static SpvcReflectedResource createSafe(long address)
public static SpvcReflectedResource.Buffer malloc(int capacity)
SpvcReflectedResource.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static SpvcReflectedResource.Buffer calloc(int capacity)
SpvcReflectedResource.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static SpvcReflectedResource.Buffer create(int capacity)
SpvcReflectedResource.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static SpvcReflectedResource.Buffer create(long address, int capacity)
SpvcReflectedResource.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static SpvcReflectedResource.Buffer createSafe(long address, int capacity)
public static SpvcReflectedResource mallocStack()
SpvcReflectedResource instance allocated on the thread-local MemoryStack.public static SpvcReflectedResource callocStack()
SpvcReflectedResource instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static SpvcReflectedResource mallocStack(org.lwjgl.system.MemoryStack stack)
SpvcReflectedResource instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static SpvcReflectedResource callocStack(org.lwjgl.system.MemoryStack stack)
SpvcReflectedResource instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static SpvcReflectedResource.Buffer mallocStack(int capacity)
SpvcReflectedResource.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static SpvcReflectedResource.Buffer callocStack(int capacity)
SpvcReflectedResource.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static SpvcReflectedResource.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
SpvcReflectedResource.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static SpvcReflectedResource.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
SpvcReflectedResource.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 nid(long struct)
id().public static int nbase_type_id(long struct)
base_type_id().public static int ntype_id(long struct)
type_id().public static java.nio.ByteBuffer nname(long struct)
name().public static java.lang.String nnameString(long struct)
nameString().public static void nid(long struct,
int value)
id.public static void nbase_type_id(long struct,
int value)
base_type_id.public static void ntype_id(long struct,
int value)
type_id.public static void nname(long struct,
java.nio.ByteBuffer value)
name.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.