• Home
  • Raw
  • Download

Lines Matching refs:pInst

163                              const char* text, spv_instruction_t* pInst) {  in encodeImmediate()  argument
170 context->binaryEncodeU32(parse_result, pInst); in encodeImmediate()
191 spv_instruction_t* pInst, in spvTextEncodeOperand() argument
195 if (auto error = encodeImmediate(context, textValue, pInst)) { in spvTextEncodeOperand()
225 if (type == SPV_OPERAND_TYPE_TYPE_ID) pInst->resultTypeId = id; in spvTextEncodeOperand()
226 spvInstructionAddWord(pInst, id); in spvTextEncodeOperand()
230 if (pInst->opcode == SpvOpExtInst && pInst->words.size() == 4) { in spvTextEncodeOperand()
231 auto ext_inst_type = context->getExtInstTypeForId(pInst->words[3]); in spvTextEncodeOperand()
235 << pInst->words[2]; in spvTextEncodeOperand()
237 pInst->extInstType = ext_inst_type; in spvTextEncodeOperand()
245 if (grammar.lookupExtInst(pInst->extInstType, textValue, &extInst) == in spvTextEncodeOperand()
248 spvInstructionAddWord(pInst, extInst->ext_inst); in spvTextEncodeOperand()
255 if (!spvExtInstIsNonSemantic(pInst->extInstType)) { in spvTextEncodeOperand()
270 spvInstructionAddWord(pInst, extInstValue.value.u32); in spvTextEncodeOperand()
292 spvInstructionAddWord(pInst, uint32_t(opcodeEntry->opcode)); in spvTextEncodeOperand()
309 textValue, error_code_for_literals, expected_type, pInst)) { in spvTextEncodeOperand()
319 pInst)) { in spvTextEncodeOperand()
330 if (SpvOpConstant == pInst->opcode || in spvTextEncodeOperand()
331 SpvOpSpecConstant == pInst->opcode) { in spvTextEncodeOperand()
335 context->getTypeOfTypeGeneratingValue(pInst->resultTypeId); in spvTextEncodeOperand()
340 if (SPV_SUCCESS == grammar.lookupOpcode(pInst->opcode, &d)) { in spvTextEncodeOperand()
347 } else if (pInst->opcode == SpvOpSwitch) { in spvTextEncodeOperand()
349 expected_type = context->getTypeOfValueInstruction(pInst->words[1]); in spvTextEncodeOperand()
357 textValue, error_code_for_literals, expected_type, pInst)) { in spvTextEncodeOperand()
378 if (SpvOpExtInstImport == pInst->opcode) { in spvTextEncodeOperand()
386 if ((error = context->recordIdAsExtInstImport(pInst->words[1], in spvTextEncodeOperand()
391 if (context->binaryEncodeString(literal.str.c_str(), pInst)) in spvTextEncodeOperand()
410 if (auto error = context->binaryEncodeU32(value, pInst)) return error; in spvTextEncodeOperand()
417 pInst, pExpectedOperands); in spvTextEncodeOperand()
422 textValue, pInst, pExpectedOperands); in spvTextEncodeOperand()
428 textValue, pInst, pExpectedOperands); in spvTextEncodeOperand()
446 if (context->binaryEncodeU32(entry->value, pInst)) { in spvTextEncodeOperand()
467 spvtools::AssemblyContext* context, spv_instruction_t* pInst) { in encodeInstructionStartingWithImmediate() argument
473 if ((error = encodeImmediate(context, firstWord.c_str(), pInst))) { in encodeInstructionStartingWithImmediate()
494 pInst, &dummyExpectedOperands); in encodeInstructionStartingWithImmediate()
512 spv_instruction_t* pInst) { in spvTextEncodeOpcode() argument
515 return encodeInstructionStartingWithImmediate(grammar, context, pInst); in spvTextEncodeOpcode()
578 pInst->opcode = opcodeEntry->opcode; in spvTextEncodeOpcode()
581 spvInstructionAddWord(pInst, 0); in spvTextEncodeOpcode()
609 result_id.c_str(), pInst, nullptr); in spvTextEncodeOpcode()
644 pInst, &expectedOperands); in spvTextEncodeOpcode()
655 if (spvOpcodeGeneratesType(pInst->opcode)) { in spvTextEncodeOpcode()
656 if (context->recordTypeDefinition(pInst) != SPV_SUCCESS) { in spvTextEncodeOpcode()
664 context->recordTypeIdForValue(pInst->words[2], pInst->words[1]); in spvTextEncodeOpcode()
667 if (pInst->words.size() > SPV_LIMIT_INSTRUCTION_WORD_COUNT_MAX) { in spvTextEncodeOpcode()
669 << "Instruction too long: " << pInst->words.size() in spvTextEncodeOpcode()
674 pInst->words[0] = in spvTextEncodeOpcode()
675 spvOpcodeMake(uint16_t(pInst->words.size()), opcodeEntry->opcode); in spvTextEncodeOpcode()