From f0fd9e85aa9e0c593169fe7e4cdbdc1908fd187d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 30 Jul 2023 18:35:18 +0200 Subject: [PATCH] Try dirtying CULL_PLANES in Execute_BoundingBox in SoftGPU --- Core/HLE/sceDisplay.cpp | 2 +- GPU/Software/SoftGpu.cpp | 7 ++++++- GPU/Software/SoftGpu.h | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 19a1224bc0..70fbc0796f 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -594,7 +594,7 @@ void __DisplayFlip(int cyclesLate) { #ifndef _DEBUG auto err = GetI18NCategory(I18NCat::ERRORS); if (g_Config.bSoftwareRendering) { - g_OSD.Show(OSDType::MESSAGE_INFO, err->T("Running slow: Try turning off Software Rendering")); + g_OSD.Show(OSDType::MESSAGE_INFO, err->T("Running slow: Try turning off Software Rendering"), 5.0f); } else { g_OSD.Show(OSDType::MESSAGE_INFO, err->T("Running slow: try frameskip, sound is choppy when slow")); } diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index c02b0ed9f9..b385680ebe 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -81,7 +81,7 @@ const SoftwareCommandTableEntry softgpuCommandTable[] = { { GE_CMD_VADDR, FLAG_EXECUTE, SoftDirty::NONE, &GPUCommon::Execute_Vaddr }, { GE_CMD_IADDR, FLAG_EXECUTE, SoftDirty::NONE, &GPUCommon::Execute_Iaddr }, { GE_CMD_BJUMP, FLAG_EXECUTE | FLAG_READS_PC | FLAG_WRITES_PC, SoftDirty::NONE, &GPUCommon::Execute_BJump }, - { GE_CMD_BOUNDINGBOX, FLAG_EXECUTE, SoftDirty::NONE, &GPUCommon::Execute_BoundingBox }, + { GE_CMD_BOUNDINGBOX, FLAG_EXECUTE, SoftDirty::NONE, &SoftGPU::Execute_BoundingBox }, { GE_CMD_PRIM, FLAG_EXECUTE, SoftDirty::NONE, &SoftGPU::Execute_Prim }, { GE_CMD_BEZIER, FLAG_EXECUTE, SoftDirty::NONE, &SoftGPU::Execute_Bezier }, @@ -1031,6 +1031,11 @@ void SoftGPU::Execute_FramebufFormat(u32 op, u32 diff) { drawEngine_->transformUnit.Flush("framebuf"); } +void SoftGPU::Execute_BoundingBox(u32 op, u32 diff) { + gstate_c.Dirty(DIRTY_CULL_PLANES); + GPUCommon::Execute_BoundingBox(op, diff); +} + void SoftGPU::Execute_ZbufPtr(u32 op, u32 diff) { // We assume depthbuf.data won't change while we're drawing. if (diff) { diff --git a/GPU/Software/SoftGpu.h b/GPU/Software/SoftGpu.h index 8171c0e6b3..a5c9a17301 100644 --- a/GPU/Software/SoftGpu.h +++ b/GPU/Software/SoftGpu.h @@ -187,6 +187,9 @@ public: // Overridden to change flushing behavior. void Execute_Call(u32 op, u32 diff); + // Overridden for a dirty flag change. + void Execute_BoundingBox(u32 op, u32 diff); + void Execute_WorldMtxNum(u32 op, u32 diff); void Execute_ViewMtxNum(u32 op, u32 diff); void Execute_ProjMtxNum(u32 op, u32 diff);