fix(agc): keep the saved guest bytes of units a fill or image copy does not cover #5707
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5707"
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-10-14T07:35:08Z.
What
Follow-up to #5657 and #5671, for the throw still reported in #361 on Disney Epic Mickey: Rebrushed (PPSA15657) by @johnmaia:
The trace on #5657 shows every stored image at generation 0: their memory was already outside the write watch when the results were written, so this is not a range leaving the watch (what #5657 and #5671 handle). On such memory, a fill (
FillClear) or image copy (CopyFrom) into a range another image overlaps cleared that image's saved guest bytes for every unit. The flush before it only stores the units the fill or copy overlaps, so units elsewhere in that image still had results pending and no saved bytes, and their next store threw.StorageTexture::forgetSavedOverdrops the saved bytes only of the units over the filled or copied range. The others are compared with them at their store as before.Tested
Linux (CachyOS, GCC 16.2.1, RTX 4090), Release,
BUILD_TESTING=ON, onmain:agc_driver_store_over_untracked: new case, an image copy into another block of a surface with results pending outside it. It fails onmainwith the message above and passes with the change.ctest -R agc_driver: 386 of 386 pass (one existing skip).tools/check_conventions.pypasses.Not run on Windows or with the title.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T07:43:12Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/tests/execution/StoreOverUntracked.cppL208, L303, L310Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T08:59:22Z.
AMD and NVIDIA runs for this PR at head
3eb19d9f2. Windows 11 Pro 26200, WinLibs GCC 15.2.0 (MinGW-w64), Release, one machine with two GPUs, each picked withANYPS5_GPU:1002:13c0, RDNA 2), driver 32.0.21036.18ctest -R "agc|shader|video_out" -j 8(518 tests, including the ones this PR adds or changes):agc_driver_lds_mixed_width_atomics,agc_driver_pixel_interlockandagc_driver_layered_volume_vertex_no_gpl. These three fail the same way on currentmain(872f52320) on this GPU and pass there on the RTX 5070; they are the three of #5271, so not caused by this PR.No title run. AI-assisted: yes (Claude Code ran the builds and tests).
Imported from boykopovar/AnyPS5. Originally posted by moong15 on 2026-10-14T09:37:59Z.
Independent confirmation on Windows with Stellar Blade (PPSA13197 v01.141). We hit the same throw, traced it to the same cause, and wrote the same per-unit change before finding this PR.
Setup: Windows 11 Pro 26200, MinGW GCC 15.2, Release, AMD Radeon RX 9070 XT (driver 32.0.32015.2008), on
mainplus #5631 and other local changes the title needs.Temporary logging (not part of any PR) at the two
layerOriginal.assignsites and at the store throw shows the pattern twice in one run:The units that throw are exactly the ones the copy did not cover: a copy over units 0-1 leaves 2-17, and a copy over units 0-3 leaves 4-35. After that the title freezes.
With the per-unit change, the next run did not throw, and the title went on to a later, unrelated failure about 14k log lines further (sampling a stencil plane as UNORM).
We also have a fill-clear regression case:
FillClearinto a smaller image over the first unit of an image with pending results over unwatched memory. It throws onmainand passes with the per-unit change. It can go into a follow-up if useful.