summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/FramebufferManager.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-11-02 13:17:38 -0500
committerGitHub <noreply@github.com>2025-11-02 13:17:38 -0500
commita4a4416ff20db79a57789931449bc80e38800b8d (patch)
treee86eeabcaaff6c137db1e2b8e2efac6783bc677c /Source/Core/VideoCommon/FramebufferManager.cpp
parent1d9c743ef793d88b53d31bb31079435c9a2b8e5f (diff)
parent6728007cb4832c80745df73f980ccff53691368f (diff)
Merge pull request #14042 from iwubcode/bp_functions_global
VideoCommon: move global variables out of BPFunctions
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferManager.cpp')
-rw-r--r--Source/Core/VideoCommon/FramebufferManager.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManager.cpp b/Source/Core/VideoCommon/FramebufferManager.cpp
index 9d2382c190..5a3c768311 100644
--- a/Source/Core/VideoCommon/FramebufferManager.cpp
+++ b/Source/Core/VideoCommon/FramebufferManager.cpp
@@ -856,7 +856,8 @@ void FramebufferManager::PopulateEFBCache(bool depth, u32 tile_index, bool async
}
void FramebufferManager::ClearEFB(const MathUtil::Rectangle<int>& rc, bool color_enable,
- bool alpha_enable, bool z_enable, u32 color, u32 z)
+ bool alpha_enable, bool z_enable, u32 color, u32 z,
+ PixelFormat pixel_format)
{
FlushEFBPokes();
FlagPeekCacheAsOutOfDate();
@@ -870,9 +871,8 @@ void FramebufferManager::ClearEFB(const MathUtil::Rectangle<int>& rc, bool color
// channel to 0xFF.
// On backends that don't allow masking Alpha clears, this allows us to use the fast path
// almost all the time
- if (bpmem.zcontrol.pixel_format == PixelFormat::RGB565_Z16 ||
- bpmem.zcontrol.pixel_format == PixelFormat::RGB8_Z24 ||
- bpmem.zcontrol.pixel_format == PixelFormat::Z24)
+ if (pixel_format == PixelFormat::RGB565_Z16 || pixel_format == PixelFormat::RGB8_Z24 ||
+ pixel_format == PixelFormat::Z24)
{
// Force alpha writes, and clear the alpha channel.
alpha_enable = true;
@@ -880,9 +880,6 @@ void FramebufferManager::ClearEFB(const MathUtil::Rectangle<int>& rc, bool color
}
g_gfx->ClearRegion(target_rc, color_enable, alpha_enable, z_enable, color, z);
-
- // Scissor rect must be restored.
- BPFunctions::SetScissorAndViewport();
}
bool FramebufferManager::CompileClearPipelines()