| 1450 | } |
| 1451 | |
| 1452 | Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id const variable) |
| 1453 | { |
| 1454 | assert(type != 0); |
| 1455 | |
| 1456 | Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), Op::OpExtInst); |
| 1457 | inst->reserveOperands(11); |
| 1458 | inst->addIdOperand(nonSemanticShaderDebugInfo); |
| 1459 | inst->addImmediateOperand(NonSemanticShaderDebugInfoDebugGlobalVariable); |
| 1460 | inst->addIdOperand(getStringId(name)); // name id |
| 1461 | inst->addIdOperand(type); // type id |
| 1462 | inst->addIdOperand(makeDebugSource(currentFileId)); // source id |
| 1463 | inst->addIdOperand(makeUintConstant(currentLine)); // line id TODO: currentLine always zero? |
| 1464 | inst->addIdOperand(makeUintConstant(0)); // TODO: column id |
| 1465 | inst->addIdOperand(makeDebugCompilationUnit()); // scope id |
| 1466 | inst->addIdOperand(getStringId(name)); // linkage name id |
| 1467 | inst->addIdOperand(variable); // variable id |
| 1468 | inst->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfoFlagIsDefinition)); // flags id |
| 1469 | |
| 1470 | constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(inst)); |
| 1471 | module.mapInstruction(inst); |
| 1472 | |
| 1473 | return inst->getResultId(); |
| 1474 | } |
| 1475 | |
| 1476 | Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber) |
| 1477 | { |
no test coverage detected