SPV: Complete OpModuleProcessed implementation, enabled by have 1.2 headers.

This commit is contained in:
John Kessenich 2018-02-22 19:36:18 -07:00
parent e1cc1e2eed
commit 57f6a016f0
3 changed files with 6 additions and 3 deletions

View File

@ -2421,7 +2421,6 @@ void Builder::dump(std::vector<unsigned int>& out) const
// Debug instructions // Debug instructions
dumpInstructions(out, strings); dumpInstructions(out, strings);
dumpModuleProcesses(out);
dumpSourceInstructions(out); dumpSourceInstructions(out);
for (int e = 0; e < (int)sourceExtensions.size(); ++e) { for (int e = 0; e < (int)sourceExtensions.size(); ++e) {
Instruction sourceExtInst(0, 0, OpSourceExtension); Instruction sourceExtInst(0, 0, OpSourceExtension);
@ -2429,7 +2428,7 @@ void Builder::dump(std::vector<unsigned int>& out) const
sourceExtInst.dump(out); sourceExtInst.dump(out);
} }
dumpInstructions(out, names); dumpInstructions(out, names);
dumpInstructions(out, lines); dumpModuleProcesses(out);
// Annotation instructions // Annotation instructions
dumpInstructions(out, decorations); dumpInstructions(out, decorations);

View File

@ -616,7 +616,6 @@ public:
std::vector<std::unique_ptr<Instruction> > entryPoints; std::vector<std::unique_ptr<Instruction> > entryPoints;
std::vector<std::unique_ptr<Instruction> > executionModes; std::vector<std::unique_ptr<Instruction> > executionModes;
std::vector<std::unique_ptr<Instruction> > names; std::vector<std::unique_ptr<Instruction> > names;
std::vector<std::unique_ptr<Instruction> > lines;
std::vector<std::unique_ptr<Instruction> > decorations; std::vector<std::unique_ptr<Instruction> > decorations;
std::vector<std::unique_ptr<Instruction> > constantsTypesGlobals; std::vector<std::unique_ptr<Instruction> > constantsTypesGlobals;
std::vector<std::unique_ptr<Instruction> > externals; std::vector<std::unique_ptr<Instruction> > externals;

View File

@ -1197,6 +1197,8 @@ const char* OpcodeString(int op)
case 319: return "OpAtomicFlagClear"; case 319: return "OpAtomicFlagClear";
case 320: return "OpImageSparseRead"; case 320: return "OpImageSparseRead";
case OpModuleProcessed: return "OpModuleProcesses";
case 4421: return "OpSubgroupBallotKHR"; case 4421: return "OpSubgroupBallotKHR";
case 4422: return "OpSubgroupFirstInvocationKHR"; case 4422: return "OpSubgroupFirstInvocationKHR";
case 4428: return "OpSubgroupAllKHR"; case 4428: return "OpSubgroupAllKHR";
@ -1348,6 +1350,7 @@ void Parameterize()
InstructionDesc[OpReleaseEvent].setResultAndType(false, false); InstructionDesc[OpReleaseEvent].setResultAndType(false, false);
InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false);
InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false);
InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
// Specific additional context-dependent operands // Specific additional context-dependent operands
@ -2839,6 +2842,8 @@ void Parameterize()
InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'");
InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'");
InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'");
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
InstructionDesc[OpGroupIAddNonUniformAMD].capabilities.push_back(CapabilityGroups); InstructionDesc[OpGroupIAddNonUniformAMD].capabilities.push_back(CapabilityGroups);
InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'");