SPIRV: Add the support of missing image functions #72

This commit is contained in:
Rex Xu
2015-09-09 16:42:49 +08:00
parent d4782c10d4
commit fc6189197d
4 changed files with 154 additions and 15 deletions

View File

@@ -822,6 +822,7 @@ Id Builder::createVariable(StorageClass storageClass, Id type, const char* name)
case StorageClassWorkgroupLocal:
case StorageClassPrivateGlobal:
case StorageClassWorkgroupGlobal:
case StorageClassAtomicCounter:
constantsTypesGlobals.push_back(inst);
module.mapInstruction(inst);
break;
@@ -975,6 +976,15 @@ void Builder::createNoResultOp(Op opCode, Id operand)
buildPoint->addInstruction(op);
}
// An opcode that has one operand, no result id, and no type
void Builder::createNoResultOp(Op opCode, const std::vector<Id>& operands)
{
Instruction* op = new Instruction(opCode);
for (auto operand : operands)
op->addIdOperand(operand);
buildPoint->addInstruction(op);
}
void Builder::createControlBarrier(Scope execution, Scope memory, MemorySemanticsMask semantics)
{
Instruction* op = new Instruction(OpControlBarrier);