2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

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

View file

@ -493,6 +493,14 @@ 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_override) {
case Regs::RenderEnable::Override::AlwaysRender:
execute_on = true;
break;
case Regs::RenderEnable::Override::NeverRender:
execute_on = false;
break;
case Regs::RenderEnable::Override::UseRenderEnable:
switch (regs.render_enable.mode) { switch (regs.render_enable.mode) {
case Regs::RenderEnable::Mode::True: { case Regs::RenderEnable::Mode::True: {
execute_on = true; execute_on = true;
@ -511,15 +519,15 @@ void Maxwell3D::ProcessQueryCondition() {
case Regs::RenderEnable::Mode::IfEqual: { case Regs::RenderEnable::Mode::IfEqual: {
Regs::ReportSemaphore::Compare cmp; Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on = execute_on = cmp.initial_sequence == cmp.current_sequence &&
cmp.initial_sequence == cmp.current_sequence && cmp.initial_mode == cmp.current_mode; cmp.initial_mode == cmp.current_mode;
break; break;
} }
case Regs::RenderEnable::Mode::IfNotEqual: { case Regs::RenderEnable::Mode::IfNotEqual: {
Regs::ReportSemaphore::Compare cmp; Regs::ReportSemaphore::Compare cmp;
memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp)); memory_manager.ReadBlock(condition_address, &cmp, sizeof(cmp));
execute_on = execute_on = cmp.initial_sequence != cmp.current_sequence ||
cmp.initial_sequence != cmp.current_sequence || cmp.initial_mode != cmp.current_mode; cmp.initial_mode != cmp.current_mode;
break; break;
} }
default: { default: {
@ -528,6 +536,8 @@ void Maxwell3D::ProcessQueryCondition() {
break; break;
} }
} }
break;
}
} }
void Maxwell3D::ProcessCounterReset() { void Maxwell3D::ProcessCounterReset() {