fix(agc): synchronize frame capture memory deltas #11185

Closed
Sumaiter wants to merge 1 commit from upstream-pr/11185 into main
Sumaiter commented 2026-10-25 20:56:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Sumaiter on 2026-10-25T20:56:49Z.


What

FrameRecorder::writeDelta() now waits up to 10 seconds for already accepted submissions before reading memory deltas, preventing stale guest bytes from overwriting a completed DMA copy during replay. A timeout throws instead of producing an inconsistent capture. The accepted/completed serials are read after the wait.

This also removes the Windows quarantine from agc_driver_frame_replay, deletes its resolved debt entry and documents the synchronized capture behavior. This should land before #11157, which will then register the Linux replay test beside the Windows test without its quarantine changes.

Tested

Windows 11, AMD Radeon RX 9070 XT (driver 32.0.32015.7029), WinLibs GCC 15.2.0, Release with BUILD_TESTING=ON. No title or console run.

  • Full build passed on the rebased PR commit.
  • agc_frame_capture, agc_driver_frame_capture_eop and agc_driver_frame_replay passed on main and on the change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Khronos 1.4.363.0 loaded; no VUID- or missing-layer message.
  • agc_driver_frame_replay passed 100/100 repetitions on the pre-rebase change; the three focused tests passed again on the rebased commit.
  • Full suite on the rebased commit: 2375/2384 passed, 7 skipped, 9 failed. The same 9 failures reproduce on unchanged main: guest_wide_formatting, agc_host_import_cut_lifetime, agc_driver_depth_plane_partial_store, agc_driver_division_output_modifiers, agc_driver_division_result_modifiers, agc_driver_f64_conversions, agc_driver_f64_transcendental, agc_driver_sample_order_grid_reference, pad_sdl.
  • check_conventions.py, check_test_registration.py --scripts, git diff --check and pr_overlap.py pass. The overlap with #11157 is coordinated as this fix first, with no dependency needed.

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 (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #10711
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11
  • AI-assisted: yes (Kimi K3.1 Pro)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5008638430 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11185). Originally posted by [Sumaiter](https://github.com/Sumaiter) on 2026-10-25T20:56:49Z. --- ### What `FrameRecorder::writeDelta()` now waits up to 10 seconds for already accepted submissions before reading memory deltas, preventing stale guest bytes from overwriting a completed DMA copy during replay. A timeout throws instead of producing an inconsistent capture. The accepted/completed serials are read after the wait. This also removes the Windows quarantine from `agc_driver_frame_replay`, deletes its resolved debt entry and documents the synchronized capture behavior. This should land before #11157, which will then register the Linux replay test beside the Windows test without its quarantine changes. ### Tested Windows 11, AMD Radeon RX 9070 XT (driver 32.0.32015.7029), WinLibs GCC 15.2.0, Release with `BUILD_TESTING=ON`. No title or console run. - Full build passed on the rebased PR commit. - `agc_frame_capture`, `agc_driver_frame_capture_eop` and `agc_driver_frame_replay` passed on `main` and on the change with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. Khronos 1.4.363.0 loaded; no `VUID-` or missing-layer message. - `agc_driver_frame_replay` passed 100/100 repetitions on the pre-rebase change; the three focused tests passed again on the rebased commit. - Full suite on the rebased commit: 2375/2384 passed, 7 skipped, 9 failed. The same 9 failures reproduce on unchanged `main`: `guest_wide_formatting`, `agc_host_import_cut_lifetime`, `agc_driver_depth_plane_partial_store`, `agc_driver_division_output_modifiers`, `agc_driver_division_result_modifiers`, `agc_driver_f64_conversions`, `agc_driver_f64_transcendental`, `agc_driver_sample_order_grid_reference`, `pad_sdl`. - `check_conventions.py`, `check_test_registration.py --scripts`, `git diff --check` and `pr_overlap.py` pass. The overlap with #11157 is coordinated as this fix first, with no dependency needed. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [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: #10711 - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11 - [x] AI-assisted: yes (Kimi K3.1 Pro)

Pull request closed

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!11185
No description provided.