From 8520e1dec59ca217c9e72387fc7615482ee9ce46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 25 Feb 2023 17:42:46 +0100 Subject: [PATCH] Move SetDisplayFramebuffer to GPUCommonHW --- GPU/GPUCommon.cpp | 4 ---- GPU/GPUCommon.h | 1 - GPU/GPUCommonHW.cpp | 4 ++++ GPU/GPUCommonHW.h | 2 ++ 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index f2f8c3c335..f7e5864cf3 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -2031,10 +2031,6 @@ void GPUCommon::SetCmdValue(u32 op) { downcount = 0; } -void GPUCommon::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) { - framebufferManager_->SetDisplayFramebuffer(framebuf, stride, format); -} - void GPUCommon::DoBlockTransfer(u32 skipDrawReason) { u32 srcBasePtr = gstate.getTransferSrcAddress(); u32 srcStride = gstate.getTransferSrcStride(); diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index c4d0a97a35..b1367275d4 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -127,7 +127,6 @@ public: uint32_t SetAddrTranslation(uint32_t value) override; uint32_t GetAddrTranslation() override; - void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) override; void CopyDisplayToOutput(bool reallyDirty) override = 0; bool PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags = GPUCopyFlag::NONE) override; bool PerformMemorySet(u32 dest, u8 v, int size) override; diff --git a/GPU/GPUCommonHW.cpp b/GPU/GPUCommonHW.cpp index 6ae48c3c5b..b51e552543 100644 --- a/GPU/GPUCommonHW.cpp +++ b/GPU/GPUCommonHW.cpp @@ -466,6 +466,10 @@ void GPUCommonHW::BeginFrame() { } } +void GPUCommonHW::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) { + framebufferManager_->SetDisplayFramebuffer(framebuf, stride, format); +} + void GPUCommonHW::CheckFlushOp(int cmd, u32 diff) { const u8 cmdFlags = cmdInfo_[cmd].flags; if (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE)) { diff --git a/GPU/GPUCommonHW.h b/GPU/GPUCommonHW.h index a51d349868..d57f8619b4 100644 --- a/GPU/GPUCommonHW.h +++ b/GPU/GPUCommonHW.h @@ -17,6 +17,8 @@ public: u32 CheckGPUFeatures() const override; + void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) override; + // Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend. std::vector DebugGetShaderIDs(DebugShaderType shader) override; std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;