fix(agc): keep render target results where the write tracker cannot prove memory fresh #120
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/120"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-09-29T00:24:54Z.
What
Where the write tracker cannot see CPU writes (no write watching: the whole Linux guest arena today, and memory outside the Windows arena),
CollectWritesanswers 0 and every unit reads as changed at every check. Two paths lost a render target's results there:StorageTexture::Refreshdropped all pending results whenever the surface's DCC keys read as a clear code, not only when the keys changed to one. Draws never update the title's keys, so a resident target cleared under a clear code keeps that code while holding newer draw results, and the lookup of the next draw sampling it re-cleared the image. On Linux Astro Bot's intro composite sampled an empty UI layer (black/missing text). Now only new clear keys drop results; results kept under the image's own clear code are stored whole (the store marks every key uncompressed, aswriteBackdoes) and re-uploaded like any untracked unit.MarkShadowedignores generation 0, so a write-back retiled into a slab over unwatched memory was never marked, published or read back; its texels were lost and the next upload re-read the stale import.UnitShadowEnablednow also requires a write-watched arena, andShadowDestinationForoffers no slab outside the arena; those retiles go into the import, as withAPS5_NO_UNIT_SHADOW=1. Windows arena memory behaves as before.Tested
agc_driver_recorder_testspasses. Its new GPU test (target cleared under 0000 keys, drawn into, refreshed; then new 0001 keys) fails without theRefreshchange ("a refresh under the image's own clear keys dropped the draw's results") and without the unit shadow change ("a unit shadow was offered for memory the write tracker does not watch").agc_driver_graphics_testspasses with #113 merged in.ctest: 57/57 pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository