fix(agc): store pending storage-image results when a queue has no more work #3334
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3334"
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 Tamalero on 2026-10-11T08:06:08Z.
What
Fixes #3272.
Cause: storage-image results stay on the GPU until a driver-side read of guest memory (
FlushGpuWrites) or, withAPS5_STORE_AT_FLIP=1, a flip stores them. A title that polls a result with plain CPU loads gets neither. Ratchet & Clank: Rift Apart writes a 384x216 R32F image from compute and spins on its last float until it is no longer -1.0, before its next flip, so it waits forever.Fix: when a queue worker runs out of work, either about to sleep or after its second completion poll, it calls
VulkanDevice::StoreIdleResults. Under the GPU mutex, that stores every pending result as for a memory access (FlushAllPending) and submits the recorded stores. The submit is essential: the stores go into the open batch, and from an idle worker nothing else would submit it. Nothing is stored while work keeps arriving, and the cost is one lock when nothing is pending.Tested
CachyOS (Linux 7.2), RTX 4090, NVIDIA 615.78, GCC Release.
agc_driver_store_at_idle: it stores through a storage image, checks the result has not reached guest memory, callsStoreIdleResults, then polls guest memory for 2 s with no wait and no further submission. It passes, and it fails when theSubmitRecordedcall is removed.ctest -R '^agc'359/360 (agc_driver_dcc_keys_first_write, #2188); the rest of the suite 409/410 (pr_overlap_encodingneeds a newer Python here).tools/check_conventions.pypasses.APS5_EAGER_WRITEBACKit passes the frame-450 wait (3 of 3 runs, the last with exactly this change) and stops later at #3274. Its intro logos also run faster than with eager write-back.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)Tested and written by Claude (AI assistant) on a contributor's machine.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T08:06:19Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Pull request closed