fix(agc): decide an edge unit's CPU keep from the pages the unit overlaps #1387
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1387"
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 Dextroid17 on 2026-10-08T01:30:52Z.
What
StorageTexture::writeBackLayerskeeps the CPU's bytes for an edge unit whenStoredOverreports that the CPU wrote it since the unit's generation. That check read one generation per 64 KiB block, so a store to another allocation sharing the block counted as a store over this surface, the whole block was kept, and GPU results written into it were discarded.This is the report's finding 1. The driver path in the same check already compares range pieces (
driverPieces); the CPU path did not:The CPU path now does the same. Each collect records the generation of every page it found dirty — Windows already has the dirty pages, Linux already has the dirty runs — and
StoredOvertests only the pages its range overlaps. A block with no page record keeps the previous whole-block answer, so nothing that does not collect holds less information than before.Tested
Linux (CachyOS, GCC, Release,
BUILD_TESTING=ON), RTX 3080 Ti,mainatdf16c4c2.agc_write_trackingstores atbase + Block + 8, which is inside the shared block but outside the queried range — exactly the report's case at one page of scale. That assertion fails onmainand passes here:Full suite: 408 of 408.
tools/check_conventions.py --base upstream/mainpasses.What this does not fix
The report's finding 2 is untouched. There, the newer stamps fall on the surface's own pages, and dumping those bytes shows they still equal the fill pattern, so the block is kept even with exact range overlap. I have no measurement for why those stamps exist; the report asks what rule is wanted and offers three variants. This PR is the one that follows from the code's own driver path, so it is the piece that is exact on its own.
I have no PPSA12544 dump, so I ran no title — the regression is at the tracker level, and this is offered for the report's own repro (Windows, RX 9070 XT) to confirm the tail-block half and to say whether the boxed letters change.
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 (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T03:10:41Z.
@oneandonlydean ready for eyes — fixes the CPU keep decision to consider only the pages an edge unit overlaps; the regression test fails on main and passes here. Four checks green.