Files
AnyPS5/docs/dev
thuanquangandClaude d36311d661 fix(agc): keep a drawn linear target's draws per 64 KiB block over a direct write's completion stamp
A direct write with completion work, recorded before draws into a resident
linear target, stamps the target's memory again when its batch completes.
The keep rule moved the whole image past that stamp only when nothing in
the image had changed since its generation, so a CPU store anywhere else
in the target, made before the completion, dropped every draw in the
direct write's range at the next store.

For a drawn target, when the whole-image check fails, the stamped 64 KiB
blocks are now checked one by one. A block with no change since the
image's generation is recorded as kept at the stamp (completionKept), and
writeBackLayers and the unwatch path read that per-block generation, so
the draws there are stored while a block the CPU wrote keeps the CPU's
bytes outside the drawn rectangles. Whole-image keeps of drawn targets are
rechecked for CPU stores after the stamp and fall back to the per-block
keep. The per-block values are cleared when the layer starts a new
pending period.

agc_driver_linear_target_direct_write_completion gains the ordering from
review: a fill over block 0, a draw into block 0, a CPU store into block 1
while the fill's completion is still pending, then the label, on
write-watched and unwatched memory.

Co-Authored-By: Claude <[email protected]>
2026-10-24 15:45:26 +07:00
..