From 99eec162da567ce08a7ab6ce4d1f4b5fa8b5af5e Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Tue, 28 Sep 2021 21:37:54 -0400 Subject: [PATCH] rescaling_pass: Logic simplification and minor style cleanup --- .../frontend/maxwell/translate_program.cpp | 1 - .../ir_opt/rescaling_pass.cpp | 49 +++++++------------ 2 files changed, 17 insertions(+), 33 deletions(-) diff --git a/src/shader_recompiler/frontend/maxwell/translate_program.cpp b/src/shader_recompiler/frontend/maxwell/translate_program.cpp index 743fb2420e..267ebe4af3 100644 --- a/src/shader_recompiler/frontend/maxwell/translate_program.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate_program.cpp @@ -183,7 +183,6 @@ IR::Program TranslateProgram(ObjectPool& inst_pool, ObjectPoolInstructions()) { - VisitMark(program, inst); + const bool is_fragment_shader{program.stage == Stage::Fragment}; + if (is_fragment_shader) { + for (IR::Block* const block : program.post_order_blocks) { + for (IR::Inst& inst : block->Instructions()) { + VisitMark(inst); + } } } for (IR::Block* const block : program.post_order_blocks) {