From 459f4473afdf9714f26fea7fd13f130976149e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 7 Aug 2026 23:49:30 +0200 Subject: [PATCH] Fix crash in GE debugger Fixes #22027 --- GPU/Common/TextureCacheCommon.cpp | 4 +++- GPU/Vulkan/TextureCacheVulkan.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 5326afa1d9..42bb089470 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -829,7 +829,9 @@ TextureApplyResult TextureCacheCommon::ApplyTexture(bool doBind) { ForgetLastTexture(); if (framebuffer) { // ApplyTextureFramebuffer is responsible for setting SetTextureFullAlpha. - ApplyTextureFramebuffer(framebuffer, gstate.getTextureFormat(), channel); + if (doBind) { + ApplyTextureFramebuffer(framebuffer, gstate.getTextureFormat(), channel); + } result.framebuffer = framebuffer; result.framebufferTextureChannel = channel; framebuffer = nullptr; diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 12b2fd1f78..68bc766fec 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -1011,7 +1011,7 @@ void TextureCacheVulkan::BoundFramebufferTexture() { bool TextureCacheVulkan::GetCurrentTextureDebug(GPUDebugBuffer &buffer, int level, bool *isFramebuffer) { // Apply texture may need to rebuild the texture if we're about to render, or bind a framebuffer. - TextureApplyResult textureResult = ApplyTexture(true); + TextureApplyResult textureResult = ApplyTexture(false); if (textureResult.framebuffer) { *isFramebuffer = true; return GetFramebufferTextureDebug(textureResult.framebuffer, textureResult.framebufferTextureChannel, buffer);