fix(main): release parked waits one queue at a time when a replayed capture delta is applied #17921

Merged
adriadam10 merged 1 commit from upstream-pr/17921 into main 2026-11-09 22:41:20 +00:00
adriadam10 commented 2026-11-09 22:41:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-09T22:41:13Z.


What

Fixes main's red agc_driver_frame_replay_busy_queue (run 42707019078; agc_driver_frame_replay_rewind_copy failed once in the same run) after #12567.

A capture delta read at idle holds both the title's fence store and the label the graphics queue writes. The replay restored the whole page while the graphics queue waited on the fence and the compute queue on the label, so the compute copy ran before graphics had written its source and the target stayed zero. When two or more non-REWIND waits are parked, the replay now applies the delta without the words they await, then writes those words one queue at a time, waiting for the queues to settle between them. Single-wait and REWIND paths are unchanged. guest_job_manager_worker_spin is a flake with no culprit in the range (7 of 305 historically).

Tested

Linux, lavapipe-class llvmpipe 20.1.2, no /dev/udmabuf (same as CI): agc_driver_frame_replay_busy_queue failed 6 of 6 before, passes 5 of 5 after. agc_driver_frame_replay, _rewind*, _wait_label, _fence_reuse, _concurrent, _cold_pipelines, _reservation_error: 14 of 14, three runs. Not reproduced: guest_job_manager_worker_spin.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: llvmpipe 20.1.2 (Linux)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5232389424 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17921). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-11-09T22:41:13Z. --- ### What Fixes main's red `agc_driver_frame_replay_busy_queue` (run 42707019078; `agc_driver_frame_replay_rewind_copy` failed once in the same run) after #12567. A capture delta read at idle holds both the title's fence store and the label the graphics queue writes. The replay restored the whole page while the graphics queue waited on the fence and the compute queue on the label, so the compute copy ran before graphics had written its source and the target stayed zero. When two or more non-REWIND waits are parked, the replay now applies the delta without the words they await, then writes those words one queue at a time, waiting for the queues to settle between them. Single-wait and REWIND paths are unchanged. `guest_job_manager_worker_spin` is a flake with no culprit in the range (7 of 305 historically). ### Tested Linux, lavapipe-class llvmpipe 20.1.2, no /dev/udmabuf (same as CI): `agc_driver_frame_replay_busy_queue` failed 6 of 6 before, passes 5 of 5 after. `agc_driver_frame_replay`, `_rewind*`, `_wait_label`, `_fence_reuse`, `_concurrent`, `_cold_pipelines`, `_reservation_error`: 14 of 14, three runs. Not reproduced: `guest_job_manager_worker_spin`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stubs - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: llvmpipe 20.1.2 (Linux) - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17921
No description provided.