From c8c2079e560ea33efc477ddd3c8afcf3d399649a Mon Sep 17 00:00:00 2001 From: Raihan Abdul Majid Date: Fri, 9 Oct 2026 09:15:28 +0700 Subject: [PATCH] fix(agc): sample resident depth surfaces when a stage-A texture record hits fastTexture took the Textures() cache entry of a stage-A image record without asking whether a depth surface is resident at the address. The full lookup in cachedTexture returns DepthSurfaceTexture first; the fast path skipped it, so once a guest-memory entry existed for a depth target's descriptor, every later sampled read got that entry and saw the guest memory under the target, which a depth target never writes. The fast path now returns nothing while a depth surface is resident there, and the lookup falls back to cachedTexture. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV --- core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp index a21d895150df..b0f1bfafc7b3 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp @@ -2658,6 +2658,7 @@ std::shared_ptr ShaderResources::fastTexture(const ImageRecord& record) // between the stages marks them uncompressed). const auto address = record.resource.baseAddress; const auto bytes = static_cast(record.guestBytes); + if (DepthSurfaceAt(address)) return nullptr; if (GuestMemory::CollectWrites(address, bytes) == 0) return nullptr; if (PendingStorageOverlaps(address, bytes, record.source.get())) return nullptr; auto keys = record.keys;