Class SpvcReflectedResource
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Layout
struct spvc_reflected_resource {
spvc_variable_id id();
spvc_type_id base_type_id();
spvc_type_id type_id();
char const * name();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSpvcReflectedResource(ByteBuffer container) Creates aSpvcReflectedResourceinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintThe base type of the declared resource.base_type_id(int value) Sets the specified value to thebase_type_id()field.static SpvcReflectedResourcecalloc()Returns a newSpvcReflectedResourceinstance allocated withmemCalloc.static SpvcReflectedResource.Buffercalloc(int capacity) Returns a newSpvcReflectedResource.Bufferinstance allocated withmemCalloc.static SpvcReflectedResource.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcReflectedResourcecalloc(org.lwjgl.system.MemoryStack stack) Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcReflectedResourcecreate()Returns a newSpvcReflectedResourceinstance allocated withBufferUtils.static SpvcReflectedResource.Buffercreate(int capacity) Returns a newSpvcReflectedResource.Bufferinstance allocated withBufferUtils.static SpvcReflectedResourcecreate(long address) Returns a newSpvcReflectedResourceinstance for the specified memory address.static SpvcReflectedResource.Buffercreate(long address, int capacity) Create aSpvcReflectedResource.Bufferinstance at the specified memory.static @Nullable SpvcReflectedResourcecreateSafe(long address) static @Nullable SpvcReflectedResource.BuffercreateSafe(long address, int capacity) intid()Resources are identified with their SPIR-V ID.id(int value) Sets the specified value to theid()field.static SpvcReflectedResourcemalloc()Returns a newSpvcReflectedResourceinstance allocated withmemAlloc.static SpvcReflectedResource.Buffermalloc(int capacity) Returns a newSpvcReflectedResource.Bufferinstance allocated withmemAlloc.static SpvcReflectedResource.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStack.static SpvcReflectedResourcemalloc(org.lwjgl.system.MemoryStack stack) Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStack.name()The declared name (OpName) of the resource.name(ByteBuffer value) Sets the address of the specified encoded string to thename()field.The declared name (OpName) of the resource.static intnbase_type_id(long struct) Unsafe version ofbase_type_id().static voidnbase_type_id(long struct, int value) Unsafe version ofbase_type_id.static intnid(long struct) Unsafe version ofid().static voidnid(long struct, int value) Unsafe version ofid.static ByteBuffernname(long struct) Unsafe version ofname().static voidnname(long struct, ByteBuffer value) Unsafe version ofname.static StringnnameString(long struct) Unsafe version ofnameString().static intntype_id(long struct) Unsafe version oftype_id().static voidntype_id(long struct, int value) Unsafe version oftype_id.set(int id, int base_type_id, int type_id, ByteBuffer name) Initializes this struct with the specified values.set(SpvcReflectedResource src) Copies the specified struct data to this struct.intsizeof()inttype_id()The type ID of the variable which includes arrays and all type modifications.type_id(int value) Sets the specified value to thetype_id()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ID
public static final int IDThe struct member offsets. -
BASE_TYPE_ID
public static final int BASE_TYPE_IDThe struct member offsets. -
TYPE_ID
public static final int TYPE_IDThe struct member offsets. -
NAME
public static final int NAMEThe struct member offsets.
-
-
Constructor Details
-
SpvcReflectedResource
Creates aSpvcReflectedResourceinstance at the current position of the specifiedByteBuffercontainer. 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<SpvcReflectedResource>
-
id
public int id()Resources are identified with their SPIR-V ID. This is the ID of the OpVariable. -
base_type_id
public int 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_idcan also be obtained withget_type(get_type(type_id).self). -
type_id
public int type_id()The type ID of the variable which includes arrays and all type modifications.This type ID is not suitable for parsing
OpMemberDecorationof a struct and other decorations in general since these modifications typically happen on thebase_type_id. -
name
The declared name (OpName) of the resource.For Buffer blocks, the name actually reflects the externally visible
Blockname. This name can be retrieved again by using eitherget_name(id)orget_name(base_type_id)depending if it's a buffer block or not. This name can be an empty string in which caseget_fallback_name(id)can be used which obtains a suitable fallback identifier for an ID. -
nameString
The declared name (OpName) of the resource.For Buffer blocks, the name actually reflects the externally visible
Blockname. This name can be retrieved again by using eitherget_name(id)orget_name(base_type_id)depending if it's a buffer block or not. This name can be an empty string in which caseget_fallback_name(id)can be used which obtains a suitable fallback identifier for an ID. -
id
Sets the specified value to theid()field. -
base_type_id
Sets the specified value to thebase_type_id()field. -
type_id
Sets the specified value to thetype_id()field. -
name
Sets the address of the specified encoded string to thename()field. -
set
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
Returns a newSpvcReflectedResourceinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSpvcReflectedResourceinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSpvcReflectedResourceinstance allocated withBufferUtils. -
create
Returns a newSpvcReflectedResourceinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSpvcReflectedResource.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSpvcReflectedResource.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSpvcReflectedResource.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSpvcReflectedResource.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSpvcReflectedResourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSpvcReflectedResource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nid
public static int nid(long struct) Unsafe version ofid(). -
nbase_type_id
public static int nbase_type_id(long struct) Unsafe version ofbase_type_id(). -
ntype_id
public static int ntype_id(long struct) Unsafe version oftype_id(). -
nname
Unsafe version ofname(). -
nnameString
Unsafe version ofnameString(). -
nid
public static void nid(long struct, int value) Unsafe version ofid. -
nbase_type_id
public static void nbase_type_id(long struct, int value) Unsafe version ofbase_type_id. -
ntype_id
public static void ntype_id(long struct, int value) Unsafe version oftype_id. -
nname
Unsafe version ofname. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-