diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-07 21:48:39 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:26 +0200 |
commit | 233e39bb7b9ca7660c7a63a386e285aa5524bd20 (patch) | |
tree | c581fa0714f3b45c40e7a078dd3888ac5970b12f /src | |
parent | shader: Interact texture buffers with buffer cache (diff) | |
download | yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.tar yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.tar.gz yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.tar.bz2 yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.tar.lz yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.tar.xz yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.tar.zst yuzu-233e39bb7b9ca7660c7a63a386e285aa5524bd20.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/control_flow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp index 1a4ee4f6c..847bb1986 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp +++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp @@ -518,6 +518,11 @@ Block* CFG::AddLabel(Block* block, Stack stack, Location pc, FunctionId function } return &*it; } + // Make sure we don't insert the same layer twice + const auto label_it{std::ranges::find(function.labels, pc, &Label::address)}; + if (label_it != function.labels.end()) { + return label_it->block; + } Block* const new_block{block_pool.Create(Block{ .begin{pc}, .end{pc}, |