diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2022-03-22 02:24:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 02:24:07 +0100 |
commit | 75046a3351effbe4054299ec4237cfcf5862fdc2 (patch) | |
tree | 4cb9127fa8aa989d55842fd1f87d4cf2677db2ad /src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp | |
parent | Merge pull request #8048 from ameerj/include-purge (diff) | |
parent | Address review comments (diff) | |
download | yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.tar yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.tar.gz yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.tar.bz2 yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.tar.lz yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.tar.xz yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.tar.zst yuzu-75046a3351effbe4054299ec4237cfcf5862fdc2.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp index 6cd13ec48..62d20ebe4 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/exit_program.cpp @@ -11,9 +11,13 @@ void ExitFragment(TranslatorVisitor& v) { const ProgramHeader sph{v.env.SPH()}; IR::Reg src_reg{IR::Reg::R0}; for (u32 render_target = 0; render_target < 8; ++render_target) { + if (!sph.ps.HasOutputComponents(render_target)) { + continue; + } const std::array<bool, 4> mask{sph.ps.EnabledOutputComponents(render_target)}; for (u32 component = 0; component < 4; ++component) { if (!mask[component]) { + ++src_reg; continue; } v.ir.SetFragColor(render_target, component, v.F(src_reg)); |