diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-16 10:02:19 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:38 +0200 |
commit | 1091995f8e5ba79d659ab39fe4dbbca26ad01488 (patch) | |
tree | d5e85c90c6131954c8947a4d4551e2fd9e35b6a4 /src/shader_recompiler | |
parent | shader: Properly manage attributes not written from previous stages (diff) | |
download | yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.gz yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.bz2 yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.lz yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.xz yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.zst yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.zip |
Diffstat (limited to 'src/shader_recompiler')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate_program.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate_program.cpp b/src/shader_recompiler/frontend/maxwell/translate_program.cpp index ed8729fca..e728b43cc 100644 --- a/src/shader_recompiler/frontend/maxwell/translate_program.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate_program.cpp @@ -174,14 +174,12 @@ IR::Program MergeDualVertexPrograms(IR::Program& vertex_a, IR::Program& vertex_b Optimization::VertexATransformPass(vertex_a); Optimization::VertexBTransformPass(vertex_b); for (const auto& term : vertex_a.syntax_list) { - if (term.type == IR::AbstractSyntaxNode::Type::Return) { - continue; + if (term.type != IR::AbstractSyntaxNode::Type::Return) { + result.syntax_list.push_back(term); } - result.syntax_list.push_back(term); - } - for (const auto& term : vertex_b.syntax_list) { - result.syntax_list.push_back(term); } + result.syntax_list.insert(result.syntax_list.end(), vertex_b.syntax_list.begin(), + vertex_b.syntax_list.end()); result.blocks = GenerateBlocks(result.syntax_list); result.post_order_blocks = vertex_b.post_order_blocks; for (const auto& block : vertex_a.post_order_blocks) { |