diff options
Diffstat (limited to 'src/shader_recompiler/frontend')
| -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) { | |||
| 11 | const ProgramHeader sph{v.env.SPH()}; | 11 | const ProgramHeader sph{v.env.SPH()}; |
| 12 | IR::Reg src_reg{IR::Reg::R0}; | 12 | IR::Reg src_reg{IR::Reg::R0}; |
| 13 | for (u32 render_target = 0; render_target < 8; ++render_target) { | 13 | for (u32 render_target = 0; render_target < 8; ++render_target) { |
| 14 | if (!sph.ps.HasOutputComponents(render_target)) { | ||
| 15 | continue; | ||
| 16 | } | ||
| 14 | const std::array<bool, 4> mask{sph.ps.EnabledOutputComponents(render_target)}; | 17 | const std::array<bool, 4> mask{sph.ps.EnabledOutputComponents(render_target)}; |
| 15 | for (u32 component = 0; component < 4; ++component) { | 18 | for (u32 component = 0; component < 4; ++component) { |
| 16 | if (!mask[component]) { | 19 | if (!mask[component]) { |
| 20 | ++src_reg; | ||
| 17 | continue; | 21 | continue; |
| 18 | } | 22 | } |
| 19 | v.ir.SetFragColor(render_target, component, v.F(src_reg)); | 23 | v.ir.SetFragColor(render_target, component, v.F(src_reg)); |