Package org.lwjgl.util.shaderc
Class SPVParsedInstruction
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct spv_parsed_instruction_t {
uint32_t const * words;
uint16_t num_words;
uint16_t opcode;
spv_ext_inst_type_t ext_inst_type;
uint32_t type_id;
uint32_t result_id;
spv_parsed_operand_t const * operands;
uint16_t num_operands;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
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 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.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
ConstructorsConstructorDescriptionSPVParsedInstruction(ByteBuffer container) Creates aSPVParsedInstructioninstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SPVParsedInstructioncalloc()Returns a newSPVParsedInstructioninstance allocated withmemCalloc.static SPVParsedInstruction.Buffercalloc(int capacity) Returns a newSPVParsedInstruction.Bufferinstance allocated withmemCalloc.static SPVParsedInstruction.Buffercalloc(int capacity, MemoryStack stack) Returns a newSPVParsedInstruction.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SPVParsedInstructioncalloc(MemoryStack stack) Returns a newSPVParsedInstructioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SPVParsedInstructioncreate()Returns a newSPVParsedInstructioninstance allocated withBufferUtils.static SPVParsedInstruction.Buffercreate(int capacity) Returns a newSPVParsedInstruction.Bufferinstance allocated withBufferUtils.static SPVParsedInstructioncreate(long address) Returns a newSPVParsedInstructioninstance for the specified memory address.static SPVParsedInstruction.Buffercreate(long address, int capacity) Create aSPVParsedInstruction.Bufferinstance at the specified memory.static @Nullable SPVParsedInstructioncreateSafe(long address) static @Nullable SPVParsedInstruction.BuffercreateSafe(long address, int capacity) intext_inst_type(int value) Sets the specified value to theext_inst_typefield.static SPVParsedInstructionmalloc()Returns a newSPVParsedInstructioninstance allocated withmemAlloc.static SPVParsedInstruction.Buffermalloc(int capacity) Returns a newSPVParsedInstruction.Bufferinstance allocated withmemAlloc.static SPVParsedInstruction.Buffermalloc(int capacity, MemoryStack stack) Returns a newSPVParsedInstruction.Bufferinstance allocated on the specifiedMemoryStack.static SPVParsedInstructionmalloc(MemoryStack stack) Returns a newSPVParsedInstructioninstance allocated on the specifiedMemoryStack.static intnext_inst_type(long struct) Unsafe version ofext_inst_type().static voidnext_inst_type(long struct, int value) Unsafe version ofext_inst_type.static shortnnum_operands(long struct) Unsafe version ofnum_operands().static voidnnum_operands(long struct, short value) Sets the specified value to thenum_operandsfield of the specifiedstruct.static shortnnum_words(long struct) Unsafe version ofnum_words().static voidnnum_words(long struct, short value) Sets the specified value to thenum_wordsfield of the specifiedstruct.static shortnopcode(long struct) Unsafe version ofopcode().static voidnopcode(long struct, short value) Unsafe version ofopcode.static SPVParsedOperand.Buffernoperands(long struct) Unsafe version ofoperands().static voidnoperands(long struct, SPVParsedOperand.Buffer value) Unsafe version ofoperands.static intnresult_id(long struct) Unsafe version ofresult_id().static voidnresult_id(long struct, int value) Unsafe version ofresult_id.static intntype_id(long struct) Unsafe version oftype_id().static voidntype_id(long struct, int value) Unsafe version oftype_id.shortshortstatic IntBuffernwords(long struct) Unsafe version ofwords.static voidUnsafe version ofwords.shortopcode()opcode(short value) Sets the specified value to theopcodefield.operands()operands(SPVParsedOperand.Buffer value) Sets the address of the specifiedSPVParsedOperand.Bufferto theoperandsfield.intresult_id(int value) Sets the specified value to theresult_idfield.set(IntBuffer words, short opcode, int ext_inst_type, int type_id, int result_id, SPVParsedOperand.Buffer operands) Initializes this struct with the specified values.set(SPVParsedInstruction src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).inttype_id()type_id(int value) Sets the specified value to thetype_idfield.static voidvalidate(long struct) Validates pointer members that should not beNULL.words()Sets the address of the specifiedIntBufferto thewordsfield.Methods 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. -
WORDS
public static final int WORDSThe struct member offsets. -
NUM_WORDS
public static final int NUM_WORDSThe struct member offsets. -
OPCODE
public static final int OPCODEThe struct member offsets. -
EXT_INST_TYPE
public static final int EXT_INST_TYPEThe struct member offsets. -
TYPE_ID
public static final int TYPE_IDThe struct member offsets. -
RESULT_ID
public static final int RESULT_IDThe struct member offsets. -
OPERANDS
public static final int OPERANDSThe struct member offsets. -
NUM_OPERANDS
public static final int NUM_OPERANDSThe struct member offsets.
-
-
Constructor Details
-
SPVParsedInstruction
Creates aSPVParsedInstructioninstance 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()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SPVParsedInstruction>
-
words
- Returns:
- a
IntBufferview of the data pointed to by thewordsfield.
-
num_words
public short num_words()- Returns:
- the value of the
num_wordsfield.
-
opcode
public short opcode()- Returns:
- the value of the
opcodefield.
-
ext_inst_type
public int ext_inst_type()- Returns:
- the value of the
ext_inst_typefield.
-
type_id
public int type_id()- Returns:
- the value of the
type_idfield.
-
result_id
public int result_id()- Returns:
- the value of the
result_idfield.
-
operands
- Returns:
- a
SPVParsedOperand.Bufferview of the struct array pointed to by theoperandsfield.
-
num_operands
public short num_operands()- Returns:
- the value of the
num_operandsfield.
-
words
Sets the address of the specifiedIntBufferto thewordsfield. -
opcode
Sets the specified value to theopcodefield. -
ext_inst_type
Sets the specified value to theext_inst_typefield. -
type_id
Sets the specified value to thetype_idfield. -
result_id
Sets the specified value to theresult_idfield. -
operands
Sets the address of the specifiedSPVParsedOperand.Bufferto theoperandsfield. -
set
public SPVParsedInstruction set(IntBuffer words, short opcode, int ext_inst_type, int type_id, int result_id, SPVParsedOperand.Buffer operands) 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 newSPVParsedInstructioninstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSPVParsedInstructioninstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSPVParsedInstructioninstance allocated withBufferUtils. -
create
Returns a newSPVParsedInstructioninstance for the specified memory address. -
createSafe
-
malloc
Returns a newSPVParsedInstruction.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSPVParsedInstruction.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSPVParsedInstruction.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSPVParsedInstruction.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSPVParsedInstructioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSPVParsedInstructioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSPVParsedInstruction.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSPVParsedInstruction.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nwords
Unsafe version ofwords. -
nnum_words
public static short nnum_words(long struct) Unsafe version ofnum_words(). -
nopcode
public static short nopcode(long struct) Unsafe version ofopcode(). -
next_inst_type
public static int next_inst_type(long struct) Unsafe version ofext_inst_type(). -
ntype_id
public static int ntype_id(long struct) Unsafe version oftype_id(). -
nresult_id
public static int nresult_id(long struct) Unsafe version ofresult_id(). -
noperands
Unsafe version ofoperands(). -
nnum_operands
public static short nnum_operands(long struct) Unsafe version ofnum_operands(). -
nwords
Unsafe version ofwords. -
nnum_words
public static void nnum_words(long struct, short value) Sets the specified value to thenum_wordsfield of the specifiedstruct. -
nopcode
public static void nopcode(long struct, short value) Unsafe version ofopcode. -
next_inst_type
public static void next_inst_type(long struct, int value) Unsafe version ofext_inst_type. -
ntype_id
public static void ntype_id(long struct, int value) Unsafe version oftype_id. -
nresult_id
public static void nresult_id(long struct, int value) Unsafe version ofresult_id. -
noperands
Unsafe version ofoperands. -
nnum_operands
public static void nnum_operands(long struct, short value) Sets the specified value to thenum_operandsfield of the specifiedstruct. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-