Commit b93e3a39 by Pyry Haulos

Remap Scope and MemorySemantics IDs in SPIRV remapper

Scope and MemorySemantics operands contain IDs as well and may need remapping.
parent 630e1bc6
...@@ -440,6 +440,8 @@ namespace spv { ...@@ -440,6 +440,8 @@ namespace spv {
for (int op = 0; numOperands > 0; ++op, --numOperands) { for (int op = 0; numOperands > 0; ++op, --numOperands) {
switch (spv::InstructionDesc[opCode].operands.getClass(op)) { switch (spv::InstructionDesc[opCode].operands.getClass(op)) {
case spv::OperandId: case spv::OperandId:
case spv::OperandScope:
case spv::OperandMemorySemantics:
idFn(asId(word++)); idFn(asId(word++));
break; break;
...@@ -500,9 +502,7 @@ namespace spv { ...@@ -500,9 +502,7 @@ namespace spv {
case spv::OperandSelect: case spv::OperandSelect:
case spv::OperandLoop: case spv::OperandLoop:
case spv::OperandFunction: case spv::OperandFunction:
case spv::OperandMemorySemantics:
case spv::OperandMemoryAccess: case spv::OperandMemoryAccess:
case spv::OperandScope:
case spv::OperandGroupOperation: case spv::OperandGroupOperation:
case spv::OperandKernelEnqueueFlags: case spv::OperandKernelEnqueueFlags:
case spv::OperandKernelProfilingInfo: case spv::OperandKernelProfilingInfo:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment