mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
@@ -2411,6 +2411,7 @@ std::shared_ptr<Texture> 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;
|
||||
|
||||
Reference in New Issue
Block a user