fix(agc): renew a storage image's upload copy when its range leaves the watch #17788
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17788"
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 Ducengarth on 2026-11-09T16:01:20Z.
What
A storage image's
generationBaselineis taken at upload only. A GPU store over write-watched memory advances the unit's generation and leaves that copy describing the bytes before the store. When the range then leaves the write watch and new results land with no refresh in between,baselineMissreportsUploadCopyDiffersand the store throwsstoring storage image results pending over memory outside the write watch ..., although only the image itself wrote the unit.The unwatch hook now renews the copy of such units in images of up to 1 MiB, once the write watch proves that the CPU left them alone since their generation. A store still in flight renews it when its own batch completes (
Recorder::OnWriteComplete), and results landing before that wait for it. A unit under a unit shadow is not renewed and still throws. The gap is indocs/dev/debt/libSceAgcDriver.md.agc_driver_store_over_untrackedgets the case for tiled and linear surfaces: stored, left the watch, new results; also with a CPU write while they are pending and with the store still in flight.Tested
Windows 11, RTX 3090 Ti, on
84f4ad4f06.Focused AGC tests, the same 53 on
mainand on this PR, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, usingctest --test-dir build -R '^(agc_driver_store_over_untracked|agc_driver_store_pending_identity|agc_driver_storage_.*|agc_storage_.*|agc_untracked_forget|agc_driver_untracked_snapshot_hint|agc_driver_recorder|agc_recorder_stored_bytes|agc_import_settle_storage_image|agc_driver_linear_target_.*)$' -V:mainwith the new test: 52 of 53 pass.agc_driver_store_over_untrackedfails with this error (unit 0 of 4: its bytes differ from the copy taken at its upload).was not found but was requested by env var VK_INSTANCE_LAYERSor anyVUID-.PPSA02681 (Dark Alliance) with
APS5_PLAYGO_UNLISTED_CHUNKS=0,1, a black loading screen then this abort at about 50-60 s onmain:0xc0000005on threadFAPREventQueueListener, which also happened onmainbefore this change.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)🤖 Generated with Claude Code