Lines Matching refs:ins

131    void parseEntryPoint(const spv_parsed_instruction_t *ins)
133 assert(ins->num_operands >= 3);
135 const spv_parsed_operand_t *op = &ins->operands[1];
139 uint32_t funcId = ins->words[op->offset];
146 op = &ins->operands[2];
148 const char *name = reinterpret_cast<const char *>(ins->words + op->offset);
153 void parseFunction(const spv_parsed_instruction_t *ins)
155 assert(ins->num_operands == 4);
157 const spv_parsed_operand_t *op = &ins->operands[1];
161 uint32_t funcId = ins->words[op->offset];
171 void parseFunctionParam(const spv_parsed_instruction_t *ins)
179 assert(ins->num_operands == 2);
180 op = &ins->operands[0];
182 typeId = ins->words[op->offset];
183 op = &ins->operands[1];
185 id = ins->words[op->offset];
189 void parseName(const spv_parsed_instruction_t *ins)
195 assert(ins->num_operands == 2);
197 op = &ins->operands[0];
199 id = ins->words[op->offset];
200 op = &ins->operands[1];
202 name = reinterpret_cast<const char *>(ins->words + op->offset);
214 void parseTypePointer(const spv_parsed_instruction_t *ins)
220 assert(ins->num_operands == 3);
222 op = &ins->operands[0];
224 typeId = ins->words[op->offset];
226 op = &ins->operands[1];
228 storageClass = ins->words[op->offset];
255 void parseOpString(const spv_parsed_instruction_t *ins)
260 assert(ins->num_operands == 2);
262 op = &ins->operands[1];
264 str = reinterpret_cast<const char *>(ins->words + op->offset);
315 void applyDecoration(uint32_t id, const spv_parsed_instruction_t *ins)
320 applyDecoration(entry, ins);
327 assert(ins->num_operands >= 2);
329 op = &ins->operands[1];
331 decoration = ins->words[op->offset];
334 uint32_t spec_id = ins->words[ins->operands[2].offset];
359 op = &ins->operands[2];
361 switch (ins->words[op->offset]) {
377 void parseOpDecorate(const spv_parsed_instruction_t *ins)
382 assert(ins->num_operands >= 2);
384 op = &ins->operands[0];
386 id = ins->words[op->offset];
388 applyDecoration(id, ins);
391 void parseOpGroupDecorate(const spv_parsed_instruction_t *ins)
393 assert(ins->num_operands >= 2);
395 const spv_parsed_operand_t *op = &ins->operands[0];
397 uint32_t groupId = ins->words[op->offset];
407 vec.reserve(ins->num_operands - 1);
408 for (uint32_t i = 1; i < ins->num_operands; ++i) {
409 op = &ins->operands[i];
411 vec.push_back(ins->words[op->offset]);
415 void parseOpTypeImage(const spv_parsed_instruction_t *ins)
421 op = &ins->operands[0];
423 typeId = ins->words[op->offset];
425 if (ins->num_operands >= 9) {
426 op = &ins->operands[8];
428 switch (ins->words[op->offset]) {
452 void parseExecutionMode(const spv_parsed_instruction_t *ins)
454 uint32_t executionMode = ins->words[ins->operands[1].offset];
455 uint32_t funcId = ins->words[ins->operands[0].offset];
461 kernel.vecHint = ins->words[ins->operands[2].offset];
464 kernel.localSize[0] = ins->words[ins->operands[2].offset];
465 kernel.localSize[1] = ins->words[ins->operands[3].offset];
466 kernel.localSize[2] = ins->words[ins->operands[4].offset];
468 kernel.localSizeHint[0] = ins->words[ins->operands[2].offset];
469 kernel.localSizeHint[1] = ins->words[ins->operands[3].offset];
470 kernel.localSizeHint[2] = ins->words[ins->operands[4].offset];
478 void parseLiteralType(const spv_parsed_instruction_t *ins)
480 uint32_t typeId = ins->words[ins->operands[0].offset];
482 switch (ins->opcode) {
487 uint32_t sizeInBits = ins->words[ins->operands[1].offset];
504 uint32_t sizeInBits = ins->words[ins->operands[1].offset];
505 bool isSigned = ins->words[ins->operands[2].offset];
548 void parseSpecConstant(const spv_parsed_instruction_t *ins)
550 uint32_t id = ins->result_id;
554 switch (ins->opcode) {
556 uint32_t typeId = ins->words[ins->operands[0].offset];
577 parseInstruction(void *data, const spv_parsed_instruction_t *ins)
581 switch (ins->opcode) {
583 parser->parseName(ins);
586 parser->parseEntryPoint(ins);
589 parser->parseFunction(ins);
592 parser->parseFunctionParam(ins);
599 parser->parseTypePointer(ins);
602 parser->parseOpTypeImage(ins);
605 parser->parseOpString(ins);
608 parser->parseOpDecorate(ins);
611 parser->parseOpGroupDecorate(ins);
614 parser->parseExecutionMode(ins);
619 parser->parseLiteralType(ins);
624 parser->parseSpecConstant(ins);