From b93e3a39576f755c59c1ed3127dbbcde4e446c1c Mon Sep 17 00:00:00 2001 From: Pyry Haulos Date: Fri, 22 Jul 2016 09:57:28 -0700 Subject: [PATCH] Remap Scope and MemorySemantics IDs in SPIRV remapper Scope and MemorySemantics operands contain IDs as well and may need remapping. --- SPIRV/SPVRemapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 1bbd589..05f220a 100755 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -440,6 +440,8 @@ namespace spv { for (int op = 0; numOperands > 0; ++op, --numOperands) { switch (spv::InstructionDesc[opCode].operands.getClass(op)) { case spv::OperandId: + case spv::OperandScope: + case spv::OperandMemorySemantics: idFn(asId(word++)); break; @@ -500,9 +502,7 @@ namespace spv { case spv::OperandSelect: case spv::OperandLoop: case spv::OperandFunction: - case spv::OperandMemorySemantics: case spv::OperandMemoryAccess: - case spv::OperandScope: case spv::OperandGroupOperation: case spv::OperandKernelEnqueueFlags: case spv::OperandKernelProfilingInfo: -- 2.7.4