mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 09:03:22 -05:00
A store the driver makes with the CPU into watched guest memory (a GuestMemory::Write, a changed-bytes write-back, a completion action's label store, the copy HLE's CPU path) faults its pages dirty in the write watch and stamps the range with MarkWritten. The faults stayed behind: collects are memoized per packet, so the next walk over those pages came later and stamped them again, as a CPU write made after every check in between. PPSA21564 fast-clears its normal G-buffer every frame with a register DCC key fill on the GPU. While that fill is still pending, the first draw into the target materializes the clear with a CPU store of the clear texels and a refresh of the resident image. A dozen draws later a walk found the store's faults, the target read as changed, and the image was uploaded again from guest memory, dropping the draws recorded in between. Lighting then sampled cleared normals and the level's moon and rocks went unlit in about half the frames. The driver's stores now consume those faults themselves: a walk before the store stamps earlier CPU writes as such, a walk after it takes the store's own faults as a driver store, and the range is stamped as before. On Windows the arena's range also holds host regions that were already in use when it was reserved (heaps, thread stacks). They are not write-watched, so a store into one is stamped as before, without a walk.