From ecf73da860546afd94bbdb6801dcdd9d23c1ba33 Mon Sep 17 00:00:00 2001 From: Michon <231849@buas.nl> Date: Thu, 1 Oct 2026 21:12:26 +0200 Subject: [PATCH] fix(agc): the stage-A fast path leaves a view of a pending image whose keys were filled to the full lookup A sampled read through a surface's keys after a uniform key fill with a clear code reads the fill's clear value, not the image's pending results (cachedTexture's clear-through-keys). The stage-A fast path returned the record's view of the pending image without that check, so a read between the fill and the image's next refresh saw the previous results. Co-Authored-By: Claude Opus 5.5 (1M context) --- 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 7d8f1b876..0da1ef943 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp @@ -2411,6 +2411,7 @@ std::shared_ptr ShaderResources::fastTexture(const ImageRecord& record) if (keys != record.entryKeys) return nullptr; if (record.source != nullptr) { if (!StorageImageCached(context, record.source.get()) || !GuestMemory::UnchangedSince(address, bytes, record.source->Generation())) return nullptr; + if (record.resource.dccAddress != 0 && IsDccClear(record.source->FilledKeys())) return nullptr; // Under fast-clear keys the view holds only while its image's results are still pending over // the surface; flushed, the clear the image cannot see makes the lookup take a snapshot. if (keys != DccKeys::Uncompressed && StorageTexture::FindPending(address, record.guestBytes) != record.source) return nullptr;