diff options
| author | 2021-06-16 05:02:19 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:38 -0400 | |
| commit | 1091995f8e5ba79d659ab39fe4dbbca26ad01488 (patch) | |
| tree | d5e85c90c6131954c8947a4d4551e2fd9e35b6a4 /src/shader_recompiler/frontend/maxwell/translate_program.cpp | |
| parent | shader: Properly manage attributes not written from previous stages (diff) | |
| download | yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.gz yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.tar.xz yuzu-1091995f8e5ba79d659ab39fe4dbbca26ad01488.zip | |
shader: Simplify MergeDualVertexPrograms
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate_program.cpp')
| -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 | |||
| 174 | Optimization::VertexATransformPass(vertex_a); | 174 | Optimization::VertexATransformPass(vertex_a); |
| 175 | Optimization::VertexBTransformPass(vertex_b); | 175 | Optimization::VertexBTransformPass(vertex_b); |
| 176 | for (const auto& term : vertex_a.syntax_list) { | 176 | for (const auto& term : vertex_a.syntax_list) { |
| 177 | if (term.type == IR::AbstractSyntaxNode::Type::Return) { | 177 | if (term.type != IR::AbstractSyntaxNode::Type::Return) { |
| 178 | continue; | 178 | result.syntax_list.push_back(term); |
| 179 | } | 179 | } |
| 180 | result.syntax_list.push_back(term); | ||
| 181 | } | ||
| 182 | for (const auto& term : vertex_b.syntax_list) { | ||
| 183 | result.syntax_list.push_back(term); | ||
| 184 | } | 180 | } |
| 181 | result.syntax_list.insert(result.syntax_list.end(), vertex_b.syntax_list.begin(), | ||
| 182 | vertex_b.syntax_list.end()); | ||
| 185 | result.blocks = GenerateBlocks(result.syntax_list); | 183 | result.blocks = GenerateBlocks(result.syntax_list); |
| 186 | result.post_order_blocks = vertex_b.post_order_blocks; | 184 | result.post_order_blocks = vertex_b.post_order_blocks; |
| 187 | for (const auto& block : vertex_a.post_order_blocks) { | 185 | for (const auto& block : vertex_a.post_order_blocks) { |