Merge pull request #8038 from liamwhite/exit-register-detection
shader_recompiler/EXIT: increment output register on failed enable test
This commit is contained in:
commit
75046a3351
2 changed files with 9 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue