From 814593ee4d94e3938f3f116f67a2ee7a2d2f4431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 19 Oct 2026 20:54:29 +0200 Subject: [PATCH] Framebuffers: Forget the depth shift tracking with the framebuffers DestroyAllFBOs (on a savestate load) kept depthShiftedFor_ and lastRenderAddress_, so a new framebuffer at the same address as the old one skipped the depth shift for a frame. Co-Authored-By: Claude Opus 5.5 (1M context) --- GPU/Common/FramebufferManagerCommon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index e26412365f..add72494c6 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -3132,6 +3132,9 @@ void FramebufferManagerCommon::NotifyConfigChanged() { void FramebufferManagerCommon::DestroyAllFBOs() { DiscardFramebufferCopy(); currentRenderVfb_ = nullptr; + // Or a new framebuffer at the same address would skip its depth shift. + depthShiftedFor_ = 0; + lastRenderAddress_ = 0; displayFramebuf_ = nullptr; prevDisplayFramebuf_ = nullptr; prevPrevDisplayFramebuf_ = nullptr;