yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #9360 from Kelebek1/R-E-S-P-E-C-T

Respect render mode override
This commit is contained in:
liamwhite 2022-12-05 22:17:22 -05:00 committed by GitHub
commit 90145c424d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 39 additions and 29 deletions

View File

@ -493,41 +493,51 @@ void Maxwell3D::ProcessQueryGet() {
void Maxwell3D::ProcessQueryCondition() { void Maxwell3D::ProcessQueryCondition() {
const GPUVAddr condition_address{regs.render_enable.Address()}; const GPUVAddr condition_address{regs.render_enable.Address()};
switch (regs.render_enable.mode) { switch (regs.render_enable_override) {
case Regs::RenderEnable::Mode::True: { case Regs::RenderEnable::Override::AlwaysRender:
execute_on = true; execute_on = true;
break; break;
} case Regs::RenderEnable::Override::NeverRender:
case Regs::RenderEnable::Mode::False: {
execute_on = false; execute_on = false;
break; break;
} case Regs::RenderEnable::Override::UseRenderEnable:
case Regs::RenderEnable::Mode::Conditional: { switch (regs.render_enable.mode) {
Regs::ReportSemaphore::Compare cmp; case Regs::RenderEnable::Mode::True: {
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); execute_on = true;
execute_on = cmp.initial_sequence != 0U && cmp.initial_mode != 0U; break;
}
case Regs::RenderEnable::Mode::False: {
execute_on = false;
break;
}
case Regs::RenderEnable::Mode::Conditional: {
Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on = cmp.initial_sequence != 0U && cmp.initial_mode != 0U;
break;
}
case Regs::RenderEnable::Mode::IfEqual: {
Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on = cmp.initial_sequence == cmp.current_sequence &&
cmp.initial_mode == cmp.current_mode;
break;
}
case Regs::RenderEnable::Mode::IfNotEqual: {
Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on = cmp.initial_sequence != cmp.current_sequence ||
cmp.initial_mode != cmp.current_mode;
break;
}
default: {
UNIMPLEMENTED_MSG("Uninplemented Condition Mode!");
execute_on = true;
break;
}
}
break; break;
} }
case Regs::RenderEnable::Mode::IfEqual: {
Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on =
cmp.initial_sequence == cmp.current_sequence && cmp.initial_mode == cmp.current_mode;
break;
}
case Regs::RenderEnable::Mode::IfNotEqual: {
Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on =
cmp.initial_sequence != cmp.current_sequence || cmp.initial_mode != cmp.current_mode;
break;
}
default: {
UNIMPLEMENTED_MSG("Uninplemented Condition Mode!");
execute_on = true;
break;
}
}
} }
void Maxwell3D::ProcessCounterReset() { void Maxwell3D::ProcessCounterReset() {