diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-14 05:24:32 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:22 +0200 |
commit | 8af9297f0972d0aaa8306369c5d04926b886a89e (patch) | |
tree | 43bb3f50d694b615d2ae821eef84e417166d4890 /src/shader_recompiler/frontend/ir/basic_block.cpp | |
parent | shader: Initial implementation of an AST (diff) | |
download | yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.gz yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.bz2 yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.lz yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.xz yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.tar.zst yuzu-8af9297f0972d0aaa8306369c5d04926b886a89e.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.cpp b/src/shader_recompiler/frontend/ir/basic_block.cpp index b5616f394..c97626712 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.cpp +++ b/src/shader_recompiler/frontend/ir/basic_block.cpp @@ -113,7 +113,7 @@ static std::string ArgToIndex(const std::map<const Block*, size_t>& block_to_ind if (arg.IsLabel()) { return BlockToIndex(block_to_index, arg.Label()); } - if (!arg.IsImmediate()) { + if (!arg.IsImmediate() || arg.IsIdentity()) { return fmt::format("%{}", InstIndex(inst_to_index, inst_index, arg.Inst())); } switch (arg.Type()) { @@ -166,7 +166,7 @@ std::string DumpBlock(const Block& block, const std::map<const Block*, size_t>& const std::string arg_str{ArgToIndex(block_to_index, inst_to_index, inst_index, arg)}; ret += arg_index != 0 ? ", " : " "; if (op == Opcode::Phi) { - ret += fmt::format("[ {}, {} ]", arg_index, + ret += fmt::format("[ {}, {} ]", arg_str, BlockToIndex(block_to_index, inst.PhiBlock(arg_index))); } else { ret += arg_str; |