Files
AnyPS5/docs/dev
Yunus Shaikh 0e17d12ff4 fix(agc): take a native multisample depth metadata fill whose GPU write is recorded after the fill is noted
Ghost of Tsushima (PPSA02225) fills the HTILE (0x50000 bytes) and the
separate stencil plane (0x870000 bytes) of its two-sample D32S8 target
with pattern 0 before it samples the target. Both are DMA_DATA fills
larger than 64 KiB. PacketMemory notes a DMA_DATA fill before
storeBufferFill records it, so when the range has a host import the
fill's GPU write is recorded after NoteDepthMetadataFill took
LastWriteNote. The note was then 0, the fill did not count as the
queued fill, and the sample that followed in the same batch refused
"external GPU writes over native multisample depth are not implemented".
A compute fill is noted after its write is recorded and was not
affected.

When the noted fill had no write note yet, the sample now looks at the
writes recorded over the HTILE or the stencil plane since the fill was
noted. It takes the one write as the fill's note when that write is the
only one, covers the whole range, and is a word fill of the noted
pattern. A second write since, a different word or a fill of part of
the range keeps the refusal. Everything else is proven as before:
complete tracked stores, no CPU write since the fill, and the plane or
HTILE words holding the fill once it has landed.

The "native multisample depth metadata fill transition is not
implemented" stop reported on #6300 is set by a fill over the HTILE
that does not cover all of it, or by any HTILE fill when the target's
sampling never activated. Ghost's fill covers the whole HTILE, so its
target was most likely refused at creation, and on #6300 the fill's
message replaced that refusal. Refusals now keep the first one, so a
target refused at creation reports its creation reason after the fills.

Tested: agc_driver_native_depth_separate_stencil runs Ghost's sequence
(creation of a depth-only HTILE that is neither pipe-aligned nor
ITERATE_256 with a separate stencil plane, clear 0 and stencil 0, a
whole-HTILE fill of 0, a whole stencil plane fill of 0, then the first
sample) with the fill stored, queued after it is noted, and queued
before it is noted. Each one samples the cleared depth and passes only
the stencil reference 0. A later queued stencil write, a queued HTILE
fill of another word and a queued fill of part of the HTILE are
refused, and a target refused at creation keeps its refusal after the
fills. Without the change the fill queued after it is noted refuses
"external GPU writes over native multisample depth are not
implemented".
2026-10-21 23:31:37 +00:00
..