diff options
Diffstat (limited to 'source/opt/flatten_decoration_pass.cpp')
-rw-r--r-- | source/opt/flatten_decoration_pass.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/opt/flatten_decoration_pass.cpp b/source/opt/flatten_decoration_pass.cpp index f4de9116f..c878c097e 100644 --- a/source/opt/flatten_decoration_pass.cpp +++ b/source/opt/flatten_decoration_pass.cpp @@ -49,16 +49,16 @@ Pass::Status FlattenDecorationPass::Process() { // Rely on unordered_map::operator[] to create its entries on first access. for (const auto& inst : annotations) { switch (inst.opcode()) { - case SpvOp::SpvOpDecorationGroup: + case spv::Op::OpDecorationGroup: group_ids.insert(inst.result_id()); break; - case SpvOp::SpvOpGroupDecorate: { + case spv::Op::OpGroupDecorate: { Words& words = normal_uses[inst.GetSingleWordInOperand(0)]; for (uint32_t i = 1; i < inst.NumInOperandWords(); i++) { words.push_back(inst.GetSingleWordInOperand(i)); } } break; - case SpvOp::SpvOpGroupMemberDecorate: { + case spv::Op::OpGroupMemberDecorate: { Words& words = member_uses[inst.GetSingleWordInOperand(0)]; for (uint32_t i = 1; i < inst.NumInOperandWords(); i++) { words.push_back(inst.GetSingleWordInOperand(i)); @@ -77,12 +77,12 @@ Pass::Status FlattenDecorationPass::Process() { // Should we replace this instruction? bool replace = false; switch (inst_iter->opcode()) { - case SpvOp::SpvOpDecorationGroup: - case SpvOp::SpvOpGroupDecorate: - case SpvOp::SpvOpGroupMemberDecorate: + case spv::Op::OpDecorationGroup: + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: replace = true; break; - case SpvOp::SpvOpDecorate: { + case spv::Op::OpDecorate: { // If this decoration targets a group, then replace it // by sets of normal and member decorations. const uint32_t group = inst_iter->GetSingleWordOperand(0); @@ -115,7 +115,7 @@ Pass::Status FlattenDecorationPass::Process() { operands.insert(operands.end(), decoration_operands_iter, inst_iter->end()); std::unique_ptr<Instruction> new_inst(new Instruction( - context(), SpvOp::SpvOpMemberDecorate, 0, 0, operands)); + context(), spv::Op::OpMemberDecorate, 0, 0, operands)); inst_iter = inst_iter.InsertBefore(std::move(new_inst)); ++inst_iter; replace = true; @@ -146,7 +146,7 @@ Pass::Status FlattenDecorationPass::Process() { if (!group_ids.empty()) { for (auto debug_inst_iter = context()->debug2_begin(); debug_inst_iter != context()->debug2_end();) { - if (debug_inst_iter->opcode() == SpvOp::SpvOpName) { + if (debug_inst_iter->opcode() == spv::Op::OpName) { const uint32_t target = debug_inst_iter->GetSingleWordOperand(0); if (group_ids.count(target)) { debug_inst_iter = debug_inst_iter.Erase(); |