feat(agc): batch a dispatch run's staged copy-ins ahead of it #9289

Open
Celegans12 wants to merge 3 commits from upstream-pr/9289 into main
Celegans12 commented 2026-10-21 17:29:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T17:29:05Z.


What

The #9176 and #9287 prerequisites have merged. This branch contains the staged-copy prelude on top of main; #13863 and #13920 build on it.

Stage a run's copy-ins in a prelude before its dispatches, preserving command-buffer order. Copy-backs share a trailing barrier except where guest ranges overlap. Queries, open passes, validation and copy captures retain the inline path; APS5_NO_BATCHED_STAGING=1 selects it. The pool bounds retained free allocations, not buffers held in flight. By default its small tier and large host tier retain up to 64 MiB and 512 MiB; the device tier uses the greater of 512 MiB and one eighth of the device-local heap size (or its reported budget if smaller); for system-memory heaps it uses the greater of 128 MiB and one sixty-fourth of that size. APS5_STAGING_POOL_MIB overrides the device tier. Returning an oversized allocation destroys it; otherwise least-recently-used free entries are evicted to fit the budget and slot cap.

With main's changed-dword copy-back, a later merged copy-back over a range an earlier one in the same batch wrote takes a plain copy, so it wins there (oneandonlydean's commit, kept as its own commit); the batched barriers include the compute stage. The debt file records the trade-off.

A run split also moves the recorder's graphics command state (#16752) to the new command buffer. Without that, draws later in the batch bound their pipeline and dynamic state into the ended buffer; BunnyFl's ASTRO BOT run on an AMD card stopped at startup on that merge.

Preserve #6185's copy rules when combining its RecordCopyBacks change; #9508 also overlaps Recorder.cpp and #14260 touches the environment docs.

Historical Yōtei menu counters (baseline, change) omit CPU and worker/phase fields and do not establish a speed gain.

Tested

Based on main 1adc0e2f4b (rebased 2026-11-17; the only conflict was the test's main(), where main's per-round changed-copy snapshot check is kept and this PR's extra runs follow it; the eleven cases were rerun on this head). Windows 11 / MinGW-w64 GCC 15.2.0, Release with -DBUILD_TESTING=ON: eleven staged-copy, inline, dispatch-overlap, recorder, barrier and graphics-state cases, including agc_bda_staging_overlap_barrier and agc_graphics_state_recorder, passed three times on RTX 3080 Laptop / 621.14 with validation 1.4.363 (synchronization validation for the barrier case). No VUIDs, hazards or skips.

With the graphics-state call removed from the split, agc_graphics_state_recorder and its unsuppressed variant failed 2 of 2 ("the graphics state still records into the command buffer the run split ended"). The two controls below were run on the previous head, on main b4a82720a8, and not repeated. With the later-copy-back fix reverted, agc_bda_staging_overlap_barrier failed 2 of 2 with incorrect bytes. With the overlap barrier removed it failed 2 of 2 with SYNC-HAZARD-WRITE-AFTER-WRITE under APS5_NO_CHANGED_COPY_BACK=1; on the default path synchronization validation does not see the changed-dword kernel's device-address writes, so it passed there. On an earlier head, moving the prelude failed the read-before-write fixture. Not tested on this head: Linux, macOS, AMD, titles/FPS (ASTRO BOT not rerun) or console behavior.

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: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 3080 Laptop, 621.14, Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4955674096 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T17:29:05Z. --- ### What The #9176 and #9287 prerequisites have merged. This branch contains the staged-copy prelude on top of `main`; #13863 and #13920 build on it. Stage a run's copy-ins in a prelude before its dispatches, preserving command-buffer order. Copy-backs share a trailing barrier except where guest ranges overlap. Queries, open passes, validation and copy captures retain the inline path; `APS5_NO_BATCHED_STAGING=1` selects it. The pool bounds retained free allocations, not buffers held in flight. By default its small tier and large host tier retain up to 64 MiB and 512 MiB; the device tier uses the greater of 512 MiB and one eighth of the device-local heap size (or its reported budget if smaller); for system-memory heaps it uses the greater of 128 MiB and one sixty-fourth of that size. `APS5_STAGING_POOL_MIB` overrides the device tier. Returning an oversized allocation destroys it; otherwise least-recently-used free entries are evicted to fit the budget and slot cap. With main's changed-dword copy-back, a later merged copy-back over a range an earlier one in the same batch wrote takes a plain copy, so it wins there (oneandonlydean's commit, kept as its own commit); the batched barriers include the compute stage. The debt file records the trade-off. A run split also moves the recorder's graphics command state (#16752) to the new command buffer. Without that, draws later in the batch bound their pipeline and dynamic state into the ended buffer; BunnyFl's ASTRO BOT run on an AMD card stopped at startup on that merge. Preserve #6185's copy rules when combining its `RecordCopyBacks` change; #9508 also overlaps `Recorder.cpp` and #14260 touches the environment docs. Historical Yōtei menu counters ([baseline](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-9287-1/aps5-summary.jsonl), [change](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-9289-1/aps5-summary.jsonl)) omit CPU and worker/phase fields and do not establish a speed gain. ### Tested Based on `main` 1adc0e2f4b (rebased 2026-11-17; the only conflict was the test's `main()`, where main's per-round changed-copy snapshot check is kept and this PR's extra runs follow it; the eleven cases were rerun on this head). Windows 11 / MinGW-w64 GCC 15.2.0, Release with `-DBUILD_TESTING=ON`: eleven staged-copy, inline, dispatch-overlap, recorder, barrier and graphics-state cases, including `agc_bda_staging_overlap_barrier` and `agc_graphics_state_recorder`, passed three times on RTX 3080 Laptop / 621.14 with validation 1.4.363 (synchronization validation for the barrier case). No VUIDs, hazards or skips. With the graphics-state call removed from the split, `agc_graphics_state_recorder` and its unsuppressed variant failed 2 of 2 ("the graphics state still records into the command buffer the run split ended"). The two controls below were run on the previous head, on `main` b4a82720a8, and not repeated. With the later-copy-back fix reverted, `agc_bda_staging_overlap_barrier` failed 2 of 2 with incorrect bytes. With the overlap barrier removed it failed 2 of 2 with `SYNC-HAZARD-WRITE-AFTER-WRITE` under `APS5_NO_CHANGED_COPY_BACK=1`; on the default path synchronization validation does not see the changed-dword kernel's device-address writes, so it passed there. On an earlier head, moving the prelude failed the read-before-write fixture. Not tested on this head: Linux, macOS, AMD, titles/FPS (ASTRO BOT not rerun) or console behavior. ### 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: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 3080 Laptop, 621.14, Windows 11 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-21 17:29:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T17:29:19Z.


This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6322304042 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#issuecomment-6322304042). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T17:29:19Z. --- <!-- pr-labels-perf --> This pull request is labeled `perf`, so it needs the summary line of a capture on `main` and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both `aps5-summary.jsonl` lines, attach the two traces and add the output of `tools/trace_digest.py`.
JJenkx commented 2026-10-22 00:42:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T00:42:11Z.


AMD/Linux data point for this stack (#9176 → #9287 → this PR) on another compute-dispatch-heavy title. Here it makes no measurable difference.

Setup

  • Code Violet (PPSA26528) 01.000.028 menu scene, Linux 7.2.9, RX 6650 XT (8 GiB), RADV (Mesa 26.2.4).
  • Both arms are built on this PR's main merge base (de4ef842b5), plus #4449 (with a local descriptor guard) and #8908, which this title needs to reach the menu: base a1002a098e, with this PR merged on top 14555838d7.
  • Same inputs, 240 s per run, alternated base, PR, PR, base. APS5_TRACE_SECONDS=200:30 with 4194304 events; every trace reports dropped false.
  • The first base run segfaulted 6 s after launch, before reaching the menu, so it left no trace. That is the intermittent startup crash this title shows at about 1 in 10 starts on this machine.
Run presents in 30 s frame p50 ms GPU busy ms/present Vulkan.Dispatch.shader_resources ms/frame Driver.Packet.dispatch ms/frame
this PR 12 3136 738 2126 3040
this PR 12 2971 839 2102 2882
base 12 3073 885 2099 3043

In this scene the dispatch cost is CPU-side shader-resource setup, which this stack does not target. GPU time per present is a little lower in both PR runs, but there is only one base run, so I would not call that a gain. No regression and no new errors.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329851091 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#issuecomment-6329851091). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-22T00:42:11Z. --- AMD/Linux data point for this stack (#9176 → #9287 → this PR) on another compute-dispatch-heavy title. Here it makes no measurable difference. **Setup** - Code Violet (PPSA26528) 01.000.028 menu scene, Linux 7.2.9, RX 6650 XT (8 GiB), RADV (Mesa 26.2.4). - Both arms are built on this PR's `main` merge base (de4ef842b5), plus #4449 (with a local descriptor guard) and #8908, which this title needs to reach the menu: base a1002a098e, with this PR merged on top 14555838d7. - Same inputs, 240 s per run, alternated base, PR, PR, base. `APS5_TRACE_SECONDS=200:30` with 4194304 events; every trace reports dropped false. - The first base run segfaulted 6 s after launch, before reaching the menu, so it left no trace. That is the intermittent startup crash this title shows at about 1 in 10 starts on this machine. | Run | presents in 30 s | frame p50 ms | GPU busy ms/present | `Vulkan.Dispatch.shader_resources` ms/frame | `Driver.Packet.dispatch` ms/frame | |---|---|---|---|---|---| | this PR | 12 | 3136 | 738 | 2126 | 3040 | | this PR | 12 | 2971 | 839 | 2102 | 2882 | | base | 12 | 3073 | 885 | 2099 | 3043 | In this scene the dispatch cost is CPU-side shader-resource setup, which this stack does not target. GPU time per present is a little lower in both PR runs, but there is only one base run, so I would not call that a gain. No regression and no new errors. AI-assisted: yes (Claude Code); results above were run on this machine.
EagleBearerYS commented 2026-10-22 04:40:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T04:40:31Z.


@Celegans12 a merge-order note: #9565 (a draft) frees a completed batch's command buffer in Recorder::release (Recorder.cpp) instead of keeping it for reuse. That is on the same lines where this PR keeps idle chunk command buffers for reuse and keeps main's reuse of the batch's own command buffer. Composed, the batch's own command buffer is freed and the chunk command buffers are handled as this PR has them. As #9565 is the smaller change, it proposes going first, and this PR would rebase over it. If you'd rather this one went first, say so and #9565 will list it under Depends on.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332865473 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#issuecomment-6332865473). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T04:40:31Z. --- @Celegans12 a merge-order note: #9565 (a draft) frees a completed batch's command buffer in `Recorder::release` (`Recorder.cpp`) instead of keeping it for reuse. That is on the same lines where this PR keeps idle chunk command buffers for reuse and keeps `main`'s reuse of the batch's own command buffer. Composed, the batch's own command buffer is freed and the chunk command buffers are handled as this PR has them. As #9565 is the smaller change, it proposes going first, and this PR would rebase over it. If you'd rather this one went first, say so and #9565 will list it under Depends on.
Celegans12 commented 2026-10-22 10:19:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-22T10:19:18Z.


Thanks for flagging it. Agreed, #9565 should go first: it's the smaller change, and #9289 is the deepest of a stack of three anyway (#9176, then #9287, then this one). Once #9565 lands I'll rebase #9289 over it. The split-off chunk buffers keep the handling this PR has, and the batch's own command buffer is freed the way #9565 does it. No need to list this PR under Depends on.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6338381661 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#issuecomment-6338381661). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-22T10:19:18Z. --- Thanks for flagging it. Agreed, #9565 should go first: it's the smaller change, and #9289 is the deepest of a stack of three anyway (#9176, then #9287, then this one). Once #9565 lands I'll rebase #9289 over it. The split-off chunk buffers keep the handling this PR has, and the batch's own command buffer is freed the way #9565 does it. No need to list this PR under Depends on.
MarcZX10 commented 2026-10-22 14:25:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T14:25:32Z.


I verified the stated order against the current heads: #9565 is at 1da6feaf1699ecdaaee9eaa1a124cf22466edafc, while this PR is at 2f412bb25fd3c389381ad6cac1cabda75137438c; a direct merge-tree currently conflicts in Graphics/src/Recorder.cpp. The #9565 author’s stated order is for it to land first and for this branch to rebase over it. Since this PR needs that change first, please add #9565 to the checklist’s Depends on line under CONTRIBUTING, and retain the existing #9176 → #9287 dependencies and all command-buffer/chunk recycling behavior when rebasing. This is merge-order coordination; I found no separate code finding in this note.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343174978 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#issuecomment-6343174978). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T14:25:32Z. --- I verified the stated order against the current heads: #9565 is at `1da6feaf1699ecdaaee9eaa1a124cf22466edafc`, while this PR is at `2f412bb25fd3c389381ad6cac1cabda75137438c`; a direct merge-tree currently conflicts in `Graphics/src/Recorder.cpp`. The #9565 author’s stated order is for it to land first and for this branch to rebase over it. Since this PR needs that change first, please add #9565 to the checklist’s `Depends on` line under CONTRIBUTING, and retain the existing #9176 → #9287 dependencies and all command-buffer/chunk recycling behavior when rebasing. This is merge-order coordination; I found no separate code finding in this note.
CnRJay commented 2026-11-01 19:58:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:58:11Z.

Review: COMMENTED


Correction (2026-11-01): the title-ID/log demand below is not a CONTRIBUTING requirement; Unblocks: none is allowed. The technical points below are unaffected.

1. No performance evidence for a perf PR. The body says the Yōtei menu counters "do not establish an FPS gain", and the linked summaries are baseline vs change JSONL from a historical build with CPU and worker/phase fields omitted. Please attach tools/trace_digest.py summaries of main and of this head from the same machine and scene, or retitle it so it does not claim a speed change. Batching copy-ins into a prelude also changes how long every staged buffer stays live in the pool ("split buffers use a bounded pool"); the bound and what happens when it is hit are not stated.

2. Scope and base. The PR targets main but carries three commits (the compute-ring unordered dispatch change, the in-run staged copies, and this one) while the body says "stacked on #9287; review the last commit only". The diff on main is therefore all three, including Recorder.cpp and PacketExecution.cpp ordering changes that this PR's description does not explain. Please say which of those belong to #9287 and rebase once it lands, or retarget.

3. Test coverage. Two test cases (agc_driver_overlap_staged_copies and its _inline variant), run once each. There is no run of the AGC tests on main against this head with the validation layer for comparison, and "Earlier negative controls are historical" means the current head has no demonstrated negative control for the new ordering: does agc_driver_overlap_staged_copies fail if the prelude copy-in is recorded after the dispatch it feeds, or if the shared trailing barrier is applied to overlapping ranges? Please show that failing run.

4. Title. No title ID and log line showing a game reaches the batched path on main; the Unblocks field should name one.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729950994 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#pullrequestreview-5729950994). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:58:11Z. **Review:** COMMENTED --- **Correction (2026-11-01):** the title-ID/log demand below is not a CONTRIBUTING requirement; `Unblocks: none` is allowed. The technical points below are unaffected. **1. No performance evidence for a `perf` PR.** The body says the Yōtei menu counters "do not establish an FPS gain", and the linked summaries are baseline vs change JSONL from a historical build with CPU and worker/phase fields omitted. Please attach `tools/trace_digest.py` summaries of `main` and of this head from the same machine and scene, or retitle it so it does not claim a speed change. Batching copy-ins into a prelude also changes how long every staged buffer stays live in the pool ("split buffers use a bounded pool"); the bound and what happens when it is hit are not stated. **2. Scope and base.** The PR targets `main` but carries three commits (the compute-ring unordered dispatch change, the in-run staged copies, and this one) while the body says "stacked on #9287; review the last commit only". The diff on `main` is therefore all three, including `Recorder.cpp` and `PacketExecution.cpp` ordering changes that this PR's description does not explain. Please say which of those belong to #9287 and rebase once it lands, or retarget. **3. Test coverage.** Two test cases (`agc_driver_overlap_staged_copies` and its `_inline` variant), run once each. There is no run of the AGC tests on `main` against this head with the validation layer for comparison, and "Earlier negative controls are historical" means the current head has no demonstrated negative control for the new ordering: does `agc_driver_overlap_staged_copies` fail if the prelude copy-in is recorded after the dispatch it feeds, or if the shared trailing barrier is applied to overlapping ranges? Please show that failing run. **4. Title.** No title ID and log line showing a game reaches the batched path on `main`; the Unblocks field should name one.
MarcZX10 commented 2026-11-23 02:22:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T02:22:58Z.

Review: APPROVED


Reviewed — looks good

Nothing in the inspected change blocks merging; optional feedback is listed below.

What I ran

Reviewed head dcace4d719541c4a80b48f4d32f84ab5c0eae156. I read the prepared description, commits, diff and manifest, then inspected targeted source context through repo_read.py. No tests or builds were run by me; the test results below are author-reported.

Results

Check Result Note
Change review passed Core staging and recorder changes inspected
Tests on this head not run Hardware results are author-reported
Remaining changed-file review not run Two oversized changed files were not read

Negative control

Not run by me. The description reports negative controls for the graphics state, overlapping copy-back ordering and the overlap barrier; they were not repeated on this head.

Findings

Blocking

None in the inspected code.

Non-blocking

  • The overlap case intentionally copies the later overlapping range in full, which may overwrite intervening CPU writes. This trade-off is documented in the description and debt entry.

Sources

  • The run split, prelude barriers, command buffer submission and spare chunk lifecycle are in core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp.
  • Staged copy-in selection and merged copy-back behavior are in core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp.
  • The graphics state continuation is in core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp.

Not verified

  • I read the changed portions of core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp, core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp, core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_overlap_staged_copies_tests.cmake, core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake, core/libs/prx/libSceAgcDriver/tests/execution/OverlapStagedCopies.cpp, docs/dev/ENVIRONMENT.md and docs/dev/debt/libSceAgcDriver.md.
  • The full text of core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp and core/libs/prx/libSceAgcDriver/tests/Recorder.cpp was excluded from the prepared folder due to size; their targeted changed sections were inspected via repo_read.py. Other portions of those files were not read.
  • Linux, macOS, AMD hardware, title performance and console behavior were not verified by me.

To get this to a good state

Nothing is required. Optional: retain the documented CPU-write trade-off when using merged overlapping copy-backs.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6015896485 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9289#pullrequestreview-6015896485). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T02:22:58Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the inspected change blocks merging; optional feedback is listed below. ## What I ran Reviewed head `dcace4d719541c4a80b48f4d32f84ab5c0eae156`. I read the prepared description, commits, diff and manifest, then inspected targeted source context through `repo_read.py`. No tests or builds were run by me; the test results below are author-reported. ## Results | Check | Result | Note | |---|---|---| | Change review | passed | Core staging and recorder changes inspected | | Tests on this head | not run | Hardware results are author-reported | | Remaining changed-file review | not run | Two oversized changed files were not read | ## Negative control Not run by me. The description reports negative controls for the graphics state, overlapping copy-back ordering and the overlap barrier; they were not repeated on this head. ## Findings ### Blocking None in the inspected code. ### Non-blocking - The overlap case intentionally copies the later overlapping range in full, which may overwrite intervening CPU writes. This trade-off is documented in the description and debt entry. ## Sources - The run split, prelude barriers, command buffer submission and spare chunk lifecycle are in `core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp`. - Staged copy-in selection and merged copy-back behavior are in `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`. - The graphics state continuation is in `core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp`. ## Not verified - I read the changed portions of `core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp`, `core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp`, `core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_overlap_staged_copies_tests.cmake`, `core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake`, `core/libs/prx/libSceAgcDriver/tests/execution/OverlapStagedCopies.cpp`, `docs/dev/ENVIRONMENT.md` and `docs/dev/debt/libSceAgcDriver.md`. - The full text of `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` and `core/libs/prx/libSceAgcDriver/tests/Recorder.cpp` was excluded from the prepared folder due to size; their targeted changed sections were inspected via `repo_read.py`. Other portions of those files were not read. - Linux, macOS, AMD hardware, title performance and console behavior were not verified by me. ## To get this to a good state Nothing is required. Optional: retain the documented CPU-write trade-off when using merged overlapping copy-backs.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/9289:upstream-pr/9289'
git switch 'upstream-pr/9289'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/9289'
git switch 'upstream-pr/9289'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/9289'
git switch 'upstream-pr/9289'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/9289'
git switch 'main'
git merge --squash 'upstream-pr/9289'
git switch 'main'
git merge --ff-only 'upstream-pr/9289'
git switch 'main'
git merge 'upstream-pr/9289'
git push origin 'main'
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!9289
No description provided.