mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
On memory outside the write watch a write-back compares guest memory with the bytes saved at the upload and leaves the 64 KiB blocks that differ to the CPU. A store of some of an image's units marked the whole saved copy invalid, and a fill turned into an image clear or an image copy never saved the bytes under it, so the next store had nothing to compare and wrote its layers whole over what the CPU had written since. The saved copy is now valid per tracked unit. A store, a drop or a stale eviction invalidates only its own units, a CPU-path store makes the units it stored valid again, and the write-back compares each run of selected units that still has saved bytes. FillClear and CopyFrom save the bytes of the units they fill when the surface is not watched, as an upload does. Results over a range that left the watch while they were pending still have no saved bytes; storing them now throws instead of overwriting the CPU's writes (technical debt).