perf(agc): draws that only update a buffer atomically continue one render pass #9852

Open
EdouardSence wants to merge 15 commits from upstream-pr/9852 into main
EdouardSence commented 2026-10-22 18:21:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-22T18:21:10Z.


What

In ASTRO BOT's Sky Garden, one vertex shader that most draws use updates a 32-record counter buffer with buffer atomics. The recompiler counts an atomic element as both read and written, so every draw after the first saw a read-after-write hazard on the open render pass and began a new pass. Since #15887, main also stages that counter through a device-local buffer for draws; the staged copy-in and copy-back each end the open pass (PassBreak::Command). On main f42d8b4a44, about 45K of the 265K to 275K draws per 10 s begin a render pass, 37K of them for a command; with this change about 10.7K of 290K to 300K draws, 2.1K for a command.

This is the atomic counterpart of #7340, which left atomic buffers out on purpose.

  • Recompiler: BufferResource::plain records any non-atomic access of a buffer (Merge). DescriptorBinding::bufferAtomicOnly marks an element whose every access is an atomic: atomic, not plain, and not aliased by an image (imageAlias). The shader disk cache stores both.
  • Binding: a draw binds its bufferAtomicOnly elements of host imports in place (Region::inPlace, checked by GuestBufferMemory::stagingWanted) instead of staging them. Dispatches keep staging them (the histogram kernels atomic staging was added for have no render pass), and an element a draw also loads or stores stays staged. APS5_DRAW_ATOMIC_STAGING=1 restores staging for draws.
  • ShaderResources::AtomicOnlyRanges(): the guest ranges of atomic-only elements that no other allocation of the draw overlaps, built like WriteOnlyRanges().
  • At record time, recordDraw keeps only the ranges whose every write by the draw lands in a host import bound in place (GuestBufferMemory::WrittenInPlace). A CPU copy already makes the draw unknownMemory, and a GPU copy or a staged copy keeps the previous behaviour. recordDraw takes the kept ranges out of the draw's hazard reads and writes and passes them as PassAccess::atomics. The recorder's write tracking (NoteAccess, pending writes) still sees them as written.
  • PassHazards:
    • Atomic ranges conflict with reads (read after write) and with read-write and write-only uses (write after write), in both directions, and with unknown reads or writes.
    • Atomic ranges of different draws over the same bytes do not conflict. The guest GPU leaves atomics of draws that no barrier separates unordered as well.
    • SealWriteOnly() also moves the open pass's atomic ranges into its writes. A flush packet between two draws still orders their atomics.
  • recordDraw also keeps the device read count up to date after the write-only erase, so the atomic erase stays within the draw's own device reads.
  • APS5_NO_ATOMIC_PASSES=1 restores the previous hazard rule.

Overlaps (textual only; whichever lands second adapts):

  • Shader disk cache format: main f42d8b4a44 and current main e917850d23 are at 68; this PR writes 69. An open PR that bumps the same FormatVersion line takes the next free version after whichever lands first.
  • git merge-tree of this head against current main e917850d23 is clean. tools/pr_overlap.py lists open PRs that touch the same files (mostly the docs/dev/ENVIRONMENT.md table); none implements the same change.

Tested

Exact revisions: this PR at a4e218f8cd. The main side is f42d8b4a44, the main that this head last merged (its merge-base with main), so the two builds differ only by this PR.

  • Linux (CachyOS, kernel 7.3.1), GCC, Release, RX 9070 XT (RADV Mesa 26.2.5), Ryzen 7 7800X3D, 31 GiB.
  • Focused tests on both revisions, same machine and GPU, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R <pattern> -V:
    • The set: agc_driver_buffer_atomics, agc_driver_global_atomics, agc_driver_recorded_draw_staging, agc_driver_graphics, agc_driver_recorder, agc_pass_hazards, agc_shader_disk_cache. This branch adds agc_driver_atomic_passes and agc_driver_atomic_passes_split, which do not exist on main.
    • main passes 6 and this branch 8; agc_driver_recorded_draw_staging skips on both (this device does not keep host imports write-watched). Neither log has a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS, and in both the loader loads VkLayer_khronos_validation.json. Logs: main, this PR.
  • New tests:
    • agc_driver_atomic_passes (tests/execution/AtomicPasses.cpp): a pixel shader adds 1 into one counter with buffer_atomic_add. One draw adds Width×Height. Two consecutive draws into a host-imported counter add twice that, and the second continues the first's pass. Two draws into a copied counter (not a guest allocation) add twice that, and the second begins a new pass. agc_driver_atomic_passes_split runs the same with APS5_NO_ATOMIC_PASSES=1, where no draw continues and both sums still match.
    • agc_driver_recorder: a 64-byte atomic counter added as a draw's atomic-only element is bound in place and WrittenInPlace reports it; added as a plain atomic element it is staged.
    • testAtomics in agc_pass_hazards covers each hazard pair and the seal.
    • agc_shader_disk_cache round-trips bufferAtomicOnly and checks it in the binding plan.
  • Speed setup:
    • ASTRO BOT PPSA21567 01.019.000, Sky Garden (-lvl underwater_aerial_garden), headless gamescope 3840×2160, title defaults, no input, 180 s per run.
    • APS5_NO_SNAPSHOT_CHECK=1 APS5_HOST_IMPORT_MIB=11815 APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_EVENTS=4194304 APS5_TRACE_SECONDS=40:25 on both sides.
    • Each revision has its own relinked run directory and shader cache. One discarded warm-up run per side, then main, PR, main, PR.
    • Every run of both revisions drops to 1 to 8 presents per 10 s at some point after the fly-in (between 60 and 145 s, the shape #18020 describes on Windows), and some recover. The table uses the 10 s intervals of the fly-in before that drop, without the level's first interval.
Build intervals presents / 10 s frame p50 ms GPU busy ms/present render passes begun / 10 s of them command
main f42d8b4a44, round 1 30-60 s 45 to 46 218 to 223 138.3 to 143.8 44807 to 45226 36965 to 37414
this PR a4e218f8cd, round 1 40-60 s 51 to 52 196 101.5 to 101.8 10865 to 10893 2088 to 2106
main, round 2 30-91 s 46 to 47 217 to 221 138.1 to 144.4 44593 to 45577 36859 to 37805
this PR, round 2 57-118 s 50 to 53 190 to 202 102.2 to 103.3 10467 to 10993 1992 to 2225

The 25 s trace windows (trace_digest.py and performance_compare.py):

Round main p50 / p90 ms, GPU this PR p50 / p90 ms, GPU
1 219.0 / 223.9, 143.9 195.8 / 199.7, 101.6
2 219.4 / 223.1, 142.3 203.7 / 224.7, 120.7

The PR's round 2 run took about 15 s longer to load, so its window starts with the level's first slow interval (155 ms GPU) and ends at 65 s; the 10 s intervals after it stay at 102 to 103 ms. Round 1's main window ends as that run's drop begins (one 3.4 s frame) and the PR's has one 5.2 s frame; p99 and max in those windows come from those single frames. No trace dropped events.

Frame p50 drops by about 10 % and GPU time per present by about 29 %; render passes begun drop by about 76 %. The queue workers stay at ~99 % on both sides.

Artifacts for all four runs (release): traces, aps5-summary.jsonl, trace_digest.py output, and the performance_compare.py output of each round. Round 1 summary lines:

{"commit":"f42d8b4a447f","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"11815","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"40:25","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.5-arch3.1","os":"Linux 7.3.1-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31227,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 40:25","first_present":502,"ms":25391.530},"presents":97,"frame_ms":{"p50":218.978,"p90":223.867,"p99":3449.562,"max":3449.562},"gpu_busy_ms_per_present":143.887,"worker_busy_pct":{"queue worker 0x0":98.617,"queue worker 0x48":87.305,"queue worker 0x40":98.323,"queue worker 0x46":0.352},"top_phases_ms_per_frame":{"Driver.Packet":743.569,"Driver.Packet.memory_wait":436.728,"Driver.Packet.draw":212.982,"Driver.Draw":211.468,"Graphics.Draw":165.893,"Graphics.Draw.draw_and_resource_release":144.631,"Driver.Draw.shader_compile_and_link":97.187,"Driver.Draw.draw_enqueued":94.765},"owned_draw_counts":{},"trace_dropped":false,"trace":"aps5-trace-f42d8b4a447f-339619.json.gz"}
{"commit":"a4e218f8cdb4","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"11815","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"40:25","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.5-arch3.1","os":"Linux 7.3.1-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31227,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 40:25","first_present":466,"ms":26013.739},"presents":107,"frame_ms":{"p50":195.816,"p90":199.718,"p99":205.315,"max":5212.140},"gpu_busy_ms_per_present":101.648,"worker_busy_pct":{"queue worker 0x0":98.592,"queue worker 0x48":80.709,"queue worker 0x40":99.905,"queue worker 0x46":0.316},"top_phases_ms_per_frame":{"Driver.Packet":678.196,"Driver.Packet.memory_wait":425.483,"Driver.Packet.draw":195.238,"Driver.Draw":193.727,"Graphics.Draw":164.756,"Graphics.Draw.draw_and_resource_release":143.956,"Driver.Draw.shader_compile_and_link":95.814,"Shader.DrawStage":80.336},"owned_draw_counts":{},"trace_dropped":false,"trace":"aps5-trace-a4e218f8cdb4-343655.json.gz"}
  • Windows, same GPU: BunnyFl's run of this head with and without APS5_DRAW_ATOMIC_STAGING=1 (in the conversation) shows the same direction: about a quarter of the render passes and ~100 against ~177 ms GPU per present.
  • Not tested: NVIDIA, Intel, other titles.

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: AMD Radeon RX 9070 XT, RADV Mesa 26.2.5, Linux 7.3.1 (CachyOS)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4972109289 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-22T18:21:10Z. --- ### What In ASTRO BOT's Sky Garden, one vertex shader that most draws use updates a 32-record counter buffer with buffer atomics. The recompiler counts an atomic element as both read and written, so every draw after the first saw a read-after-write hazard on the open render pass and began a new pass. Since #15887, `main` also stages that counter through a device-local buffer for draws; the staged copy-in and copy-back each end the open pass (`PassBreak::Command`). On `main` `f42d8b4a44`, about 45K of the 265K to 275K draws per 10 s begin a render pass, 37K of them for a command; with this change about 10.7K of 290K to 300K draws, 2.1K for a command. This is the atomic counterpart of #7340, which left atomic buffers out on purpose. - Recompiler: `BufferResource::plain` records any non-atomic access of a buffer (`Merge`). `DescriptorBinding::bufferAtomicOnly` marks an element whose every access is an atomic: atomic, not plain, and not aliased by an image (`imageAlias`). The shader disk cache stores both. - Binding: a draw binds its `bufferAtomicOnly` elements of host imports in place (`Region::inPlace`, checked by `GuestBufferMemory::stagingWanted`) instead of staging them. Dispatches keep staging them (the histogram kernels atomic staging was added for have no render pass), and an element a draw also loads or stores stays staged. `APS5_DRAW_ATOMIC_STAGING=1` restores staging for draws. - `ShaderResources::AtomicOnlyRanges()`: the guest ranges of atomic-only elements that no other allocation of the draw overlaps, built like `WriteOnlyRanges()`. - At record time, `recordDraw` keeps only the ranges whose every write by the draw lands in a host import bound in place (`GuestBufferMemory::WrittenInPlace`). A CPU copy already makes the draw `unknownMemory`, and a GPU copy or a staged copy keeps the previous behaviour. `recordDraw` takes the kept ranges out of the draw's hazard reads and writes and passes them as `PassAccess::atomics`. The recorder's write tracking (`NoteAccess`, pending writes) still sees them as written. - `PassHazards`: - Atomic ranges conflict with reads (read after write) and with read-write and write-only uses (write after write), in both directions, and with unknown reads or writes. - Atomic ranges of different draws over the same bytes do not conflict. The guest GPU leaves atomics of draws that no barrier separates unordered as well. - `SealWriteOnly()` also moves the open pass's atomic ranges into its writes. A flush packet between two draws still orders their atomics. - `recordDraw` also keeps the device read count up to date after the write-only erase, so the atomic erase stays within the draw's own device reads. - `APS5_NO_ATOMIC_PASSES=1` restores the previous hazard rule. Overlaps (textual only; whichever lands second adapts): - Shader disk cache format: `main` `f42d8b4a44` and current `main` `e917850d23` are at 68; this PR writes 69. An open PR that bumps the same `FormatVersion` line takes the next free version after whichever lands first. - `git merge-tree` of this head against current `main` `e917850d23` is clean. `tools/pr_overlap.py` lists open PRs that touch the same files (mostly the `docs/dev/ENVIRONMENT.md` table); none implements the same change. ### Tested Exact revisions: this PR at `a4e218f8cd`. The `main` side is `f42d8b4a44`, the `main` that this head last merged (its merge-base with `main`), so the two builds differ only by this PR. - Linux (CachyOS, kernel 7.3.1), GCC, Release, RX 9070 XT (RADV Mesa 26.2.5), Ryzen 7 7800X3D, 31 GiB. - Focused tests on both revisions, same machine and GPU, with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R <pattern> -V`: - The set: `agc_driver_buffer_atomics`, `agc_driver_global_atomics`, `agc_driver_recorded_draw_staging`, `agc_driver_graphics`, `agc_driver_recorder`, `agc_pass_hazards`, `agc_shader_disk_cache`. This branch adds `agc_driver_atomic_passes` and `agc_driver_atomic_passes_split`, which do not exist on `main`. - `main` passes 6 and this branch 8; `agc_driver_recorded_draw_staging` skips on both (this device does not keep host imports write-watched). Neither log has a `VUID-` line or `was not found but was requested by env var VK_INSTANCE_LAYERS`, and in both the loader loads `VkLayer_khronos_validation.json`. Logs: [main](https://github.com/EdouardSence/AnyPS5/releases/download/perf-traces-atomic-passes-a4e218f8/focused-tests-main-f42d8b4a44.log), [this PR](https://github.com/EdouardSence/AnyPS5/releases/download/perf-traces-atomic-passes-a4e218f8/focused-tests-pr-a4e218f8cd.log). - New tests: - `agc_driver_atomic_passes` (`tests/execution/AtomicPasses.cpp`): a pixel shader adds 1 into one counter with `buffer_atomic_add`. One draw adds Width×Height. Two consecutive draws into a host-imported counter add twice that, and the second continues the first's pass. Two draws into a copied counter (not a guest allocation) add twice that, and the second begins a new pass. `agc_driver_atomic_passes_split` runs the same with `APS5_NO_ATOMIC_PASSES=1`, where no draw continues and both sums still match. - `agc_driver_recorder`: a 64-byte atomic counter added as a draw's atomic-only element is bound in place and `WrittenInPlace` reports it; added as a plain atomic element it is staged. - `testAtomics` in `agc_pass_hazards` covers each hazard pair and the seal. - `agc_shader_disk_cache` round-trips `bufferAtomicOnly` and checks it in the binding plan. - Speed setup: - ASTRO BOT PPSA21567 01.019.000, Sky Garden (`-lvl underwater_aerial_garden`), headless gamescope 3840×2160, title defaults, no input, 180 s per run. - `APS5_NO_SNAPSHOT_CHECK=1 APS5_HOST_IMPORT_MIB=11815 APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=10 APS5_TRACE_EVENTS=4194304 APS5_TRACE_SECONDS=40:25` on both sides. - Each revision has its own relinked run directory and shader cache. One discarded warm-up run per side, then `main`, PR, `main`, PR. - Every run of both revisions drops to 1 to 8 presents per 10 s at some point after the fly-in (between 60 and 145 s, the shape #18020 describes on Windows), and some recover. The table uses the 10 s intervals of the fly-in before that drop, without the level's first interval. | Build | intervals | presents / 10 s | frame p50 ms | GPU busy ms/present | render passes begun / 10 s | of them `command` | |---|---|---:|---:|---:|---:|---:| | `main` `f42d8b4a44`, round 1 | 30-60 s | 45 to 46 | 218 to 223 | 138.3 to 143.8 | 44807 to 45226 | 36965 to 37414 | | this PR `a4e218f8cd`, round 1 | 40-60 s | 51 to 52 | 196 | 101.5 to 101.8 | 10865 to 10893 | 2088 to 2106 | | `main`, round 2 | 30-91 s | 46 to 47 | 217 to 221 | 138.1 to 144.4 | 44593 to 45577 | 36859 to 37805 | | this PR, round 2 | 57-118 s | 50 to 53 | 190 to 202 | 102.2 to 103.3 | 10467 to 10993 | 1992 to 2225 | The 25 s trace windows (`trace_digest.py` and `performance_compare.py`): | Round | `main` p50 / p90 ms, GPU | this PR p50 / p90 ms, GPU | |---|---|---| | 1 | 219.0 / 223.9, 143.9 | 195.8 / 199.7, 101.6 | | 2 | 219.4 / 223.1, 142.3 | 203.7 / 224.7, 120.7 | The PR's round 2 run took about 15 s longer to load, so its window starts with the level's first slow interval (155 ms GPU) and ends at 65 s; the 10 s intervals after it stay at 102 to 103 ms. Round 1's `main` window ends as that run's drop begins (one 3.4 s frame) and the PR's has one 5.2 s frame; p99 and max in those windows come from those single frames. No trace dropped events. Frame p50 drops by about 10 % and GPU time per present by about 29 %; render passes begun drop by about 76 %. The queue workers stay at ~99 % on both sides. Artifacts for all four runs ([release](https://github.com/EdouardSence/AnyPS5/releases/tag/perf-traces-atomic-passes-a4e218f8)): traces, `aps5-summary.jsonl`, `trace_digest.py` output, and the `performance_compare.py` output of each round. Round 1 summary lines: ```json {"commit":"f42d8b4a447f","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"11815","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"40:25","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.5-arch3.1","os":"Linux 7.3.1-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31227,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 40:25","first_present":502,"ms":25391.530},"presents":97,"frame_ms":{"p50":218.978,"p90":223.867,"p99":3449.562,"max":3449.562},"gpu_busy_ms_per_present":143.887,"worker_busy_pct":{"queue worker 0x0":98.617,"queue worker 0x48":87.305,"queue worker 0x40":98.323,"queue worker 0x46":0.352},"top_phases_ms_per_frame":{"Driver.Packet":743.569,"Driver.Packet.memory_wait":436.728,"Driver.Packet.draw":212.982,"Driver.Draw":211.468,"Graphics.Draw":165.893,"Graphics.Draw.draw_and_resource_release":144.631,"Driver.Draw.shader_compile_and_link":97.187,"Driver.Draw.draw_enqueued":94.765},"owned_draw_counts":{},"trace_dropped":false,"trace":"aps5-trace-f42d8b4a447f-339619.json.gz"} {"commit":"a4e218f8cdb4","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"11815","APS5_NO_SNAPSHOT_CHECK":"1","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"4194304","APS5_TRACE_SECONDS":"40:25","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon RX 9070 XT (RADV GFX1201)","driver":"radv Mesa 26.2.5-arch3.1","os":"Linux 7.3.1-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31227,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 40:25","first_present":466,"ms":26013.739},"presents":107,"frame_ms":{"p50":195.816,"p90":199.718,"p99":205.315,"max":5212.140},"gpu_busy_ms_per_present":101.648,"worker_busy_pct":{"queue worker 0x0":98.592,"queue worker 0x48":80.709,"queue worker 0x40":99.905,"queue worker 0x46":0.316},"top_phases_ms_per_frame":{"Driver.Packet":678.196,"Driver.Packet.memory_wait":425.483,"Driver.Packet.draw":195.238,"Driver.Draw":193.727,"Graphics.Draw":164.756,"Graphics.Draw.draw_and_resource_release":143.956,"Driver.Draw.shader_compile_and_link":95.814,"Shader.DrawStage":80.336},"owned_draw_counts":{},"trace_dropped":false,"trace":"aps5-trace-a4e218f8cdb4-343655.json.gz"} ``` - Windows, same GPU: BunnyFl's run of this head with and without `APS5_DRAW_ATOMIC_STAGING=1` (in the conversation) shows the same direction: about a quarter of the render passes and ~100 against ~177 ms GPU per present. - Not tested: NVIDIA, Intel, other titles. ### 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: AMD Radeon RX 9070 XT, RADV Mesa 26.2.5, Linux 7.3.1 (CachyOS) - [x] AI-assisted: yes
MarcZX10 commented 2026-10-29 06:25:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T06:25:21Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

The performance report is substantial: it has matched traces/digests for the same scenes and machines, including an independent NVIDIA run, and the author reports validation-layer tests. The current exact head 470cbe5b01a3d55e2698086ecb47059f3ded6b73 also records cache format 50, correctly above current main’s 49.

The integration and performance evidence need one more refresh. This head is 318 commits behind current main 2960e9a6e7e1fc99c4ed180c71495b5eb83464c7; both Draw.cpp and the AGC CMakeLists.txt changed on both sides since its merge base. The main-side Draw.cpp changes affect draw preparation/recording, so the previous atomic-pass A/B and full test run on b9eafb0c49 do not validate the current composition. Please merge current main, preserve the format-version ordering, run the focused atomic-pass/adjacent draw tests on both the integrated main and PR heads, and refresh the matched performance capture on any scene whose draw path changed.

The author’s full CTest report on the previous head is 2738/2742; two failures match main on that tree, tessellation was previously observed on main, and image-table’s gamescope validation message is environment-specific. Please keep those results explicit and report a fresh baseline for any remaining failures. I did not run GPU tests locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693689707 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852#pullrequestreview-5693689707). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T06:25:21Z. **Review:** CHANGES_REQUESTED --- ## Re-checked — changes requested The performance report is substantial: it has matched traces/digests for the same scenes and machines, including an independent NVIDIA run, and the author reports validation-layer tests. The current exact head `470cbe5b01a3d55e2698086ecb47059f3ded6b73` also records cache format 50, correctly above current main’s 49. The integration and performance evidence need one more refresh. This head is 318 commits behind current `main` `2960e9a6e7e1fc99c4ed180c71495b5eb83464c7`; both `Draw.cpp` and the AGC `CMakeLists.txt` changed on both sides since its merge base. The main-side `Draw.cpp` changes affect draw preparation/recording, so the previous atomic-pass A/B and full test run on `b9eafb0c49` do not validate the current composition. Please merge current main, preserve the format-version ordering, run the focused atomic-pass/adjacent draw tests on both the integrated main and PR heads, and refresh the matched performance capture on any scene whose draw path changed. The author’s full CTest report on the previous head is 2738/2742; two failures match main on that tree, tessellation was previously observed on main, and image-table’s gamescope validation message is environment-specific. Please keep those results explicit and report a fresh baseline for any remaining failures. I did not run GPU tests locally.
MarcZX10 commented 2026-11-12 01:19:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T01:19:29Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The current head still lacks the matched main/PR Vulkan evidence required for AGC changes and the complete performance artifacts required for a perf PR.

What I ran

Reviewed head a4e218f8cdb41149badf3e638759d01ef009e285; the no-build precheck used base 4f7fbdb09575bf830ab3df93836a37057ecd5363 and reported a clean merge preview. Environment: Linux 6.1, Python 3.11.2, Git 2.39.5, GCC 12.2.0.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9852 --output-dir /tmp/anyps5-pr-precheck-9852
gh pr checks 9852 --repo boykopovar/AnyPS5

The author reports the focused Vulkan tests passing on this head. I did not run them locally or verify an equivalent main baseline.

Results

Check Result Note
Diff and conventions passed Exact head and base remained unchanged during precheck.
Merge preview passed Clean against the tested base.
Hosted CI passed 9 jobs passed; 6 were skipped.
Focused Vulkan tests not run Author reports PR-head runs; no matching main run was provided.
Performance report incomplete Latest current-head post has no attached traces or trace_digest.py output and does not compare current main against the change.
Precheck output
Conclusion: checks incomplete
Head: a4e218f8cdb41149badf3e638759d01ef009e285
Base used for checks: 4f7fbdb09575bf830ab3df93836a37057ecd5363
Head unchanged at completion: True
Base branch tip at completion: 4f7fbdb09575bf830ab3df93836a37057ecd5363
Checks: diff_check passed; conventions_and_pr_template passed; live_dependency_and_mergeability_check passed; test_quality_heuristics passed.
Not run: build_and_compile; build_dependent_cpp_tests.
Not applicable: Python checks and negative controls.
Hosted snapshot: 9 passed; 6 skipped.

Negative control

Not run: I did not build the exact head locally, so I could not run a negative control against its new GPU execution test.

Findings

Blocking

  • The PR is labeled perf, but the latest report for a4e218f8cdb41149badf3e638759d01ef009e285 does not provide a matched capture of current main and this change from the same title, scene and machine, with both aps5-summary.jsonl lines, the two trace files and tools/trace_digest.py output. The posted Windows comparison toggles APS5_DRAW_ATOMIC_STAGING on the PR head; it is useful A/B data, but it is not the required main-versus-change capture. Please provide the matched artifacts for this head.
  • The AGC validation reported for this head covers the PR build only. The repository asks for the same focused tests on main and the change, with Vulkan validation enabled, to identify new validation errors. Please provide both logs and the comparison, or explain which focused cases cannot run on main and why.

Non-blocking

  • The precheck heuristic flagged four changed C++ tests as possibly unregistered. Inspection of the AGC CMake source glob and agc_add_default_test registration shows those warnings are false positives; they are not findings against the PR.

Sources

Not verified

  • The author-reported GPU tests and performance measurements were not independently rerun here.
  • No local build, console run, or GPU run was performed.
  • Six hosted jobs were skipped and provide no test evidence.

To get this to a good state

Provide current matched main/PR performance captures and the required focused Vulkan test logs for both revisions. I will re-check those artifacts against the same head before changing this review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5867565396 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852#pullrequestreview-5867565396). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T01:19:29Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The current head still lacks the matched `main`/PR Vulkan evidence required for AGC changes and the complete performance artifacts required for a `perf` PR. ## What I ran Reviewed head `a4e218f8cdb41149badf3e638759d01ef009e285`; the no-build precheck used base `4f7fbdb09575bf830ab3df93836a37057ecd5363` and reported a clean merge preview. Environment: Linux 6.1, Python 3.11.2, Git 2.39.5, GCC 12.2.0. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9852 --output-dir /tmp/anyps5-pr-precheck-9852 gh pr checks 9852 --repo boykopovar/AnyPS5 ``` The author reports the focused Vulkan tests passing on this head. I did not run them locally or verify an equivalent `main` baseline. ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Exact head and base remained unchanged during precheck. | | Merge preview | passed | Clean against the tested base. | | Hosted CI | passed | 9 jobs passed; 6 were skipped. | | Focused Vulkan tests | not run | Author reports PR-head runs; no matching `main` run was provided. | | Performance report | incomplete | Latest current-head post has no attached traces or `trace_digest.py` output and does not compare current `main` against the change. | <details> <summary>Precheck output</summary> ```text Conclusion: checks incomplete Head: a4e218f8cdb41149badf3e638759d01ef009e285 Base used for checks: 4f7fbdb09575bf830ab3df93836a37057ecd5363 Head unchanged at completion: True Base branch tip at completion: 4f7fbdb09575bf830ab3df93836a37057ecd5363 Checks: diff_check passed; conventions_and_pr_template passed; live_dependency_and_mergeability_check passed; test_quality_heuristics passed. Not run: build_and_compile; build_dependent_cpp_tests. Not applicable: Python checks and negative controls. Hosted snapshot: 9 passed; 6 skipped. ``` </details> ## Negative control Not run: I did not build the exact head locally, so I could not run a negative control against its new GPU execution test. ## Findings ### Blocking - The PR is labeled `perf`, but the latest report for `a4e218f8cdb41149badf3e638759d01ef009e285` does not provide a matched capture of current `main` and this change from the same title, scene and machine, with both `aps5-summary.jsonl` lines, the two trace files and `tools/trace_digest.py` output. The posted Windows comparison toggles `APS5_DRAW_ATOMIC_STAGING` on the PR head; it is useful A/B data, but it is not the required `main`-versus-change capture. Please provide the matched artifacts for this head. - The AGC validation reported for this head covers the PR build only. The repository asks for the same focused tests on `main` and the change, with Vulkan validation enabled, to identify new validation errors. Please provide both logs and the comparison, or explain which focused cases cannot run on `main` and why. ### Non-blocking - The precheck heuristic flagged four changed C++ tests as possibly unregistered. Inspection of the AGC CMake source glob and `agc_add_default_test` registration shows those warnings are false positives; they are not findings against the PR. ## Sources - [Performance capture requirements](https://github.com/boykopovar/AnyPS5/blob/4f7fbdb09575bf830ab3df93836a37057ecd5363/docs/dev/GAME_TESTING.md#measuring-performance) - [AGC validation requirements](https://github.com/boykopovar/AnyPS5/blob/4f7fbdb09575bf830ab3df93836a37057ecd5363/AGENTS.md) - [AGC execution-test registration](https://github.com/boykopovar/AnyPS5/blob/a4e218f8cdb41149badf3e638759d01ef009e285/core/libs/prx/libSceAgcDriver/CMakeLists.txt) ## Not verified - The author-reported GPU tests and performance measurements were not independently rerun here. - No local build, console run, or GPU run was performed. - Six hosted jobs were skipped and provide no test evidence. ## To get this to a good state Provide current matched `main`/PR performance captures and the required focused Vulkan test logs for both revisions. I will re-check those artifacts against the same head before changing this review.
MarcZX10 commented 2026-11-15 18:30:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T18:30:38Z.

Review: COMMENTED


Reviewed — comments

The changed hazard tracking and in-place atomic binding paths were inspected at head 353c2960b77db373b419f1ddb5989e8477536251; material parts of the change remain unverified because several changed files were too large to include in the review folder.

What I ran

No tests or build commands were run. I read the prepared description, commit list, manifest, diff, and targeted source ranges with repo_read.py.

Results

Check Result Note
Diff and targeted code review not run Review remains incomplete
Tests and build not run Author reports focused tests; not independently verified

Findings

Blocking

None verified in the code inspected.

Non-blocking

None.

Not verified

Full text was available and inspected selectively for GuestBufferMemory.hpp, PassHazards.hpp, ShaderResources.hpp, Draw.cpp, PassHazards.cpp, PassHazards.cpp tests, ShaderDiskCache.cpp tests, the atomic-pass CMake test, and the new AtomicPasses.cpp test. Targeted ranges were read for the excluded full-text files GuestBufferMemory.cpp, ShaderResources.cpp, and Recorder.cpp tests; their complete contents were not read. The remaining changed files listed in the manifest were not read. The reported test runs, performance results, other GPUs, and other titles were not independently verified.

To get this to a good state

Nothing is required. Optional: complete review of the remaining changed files and run the focused tests on this head before treating the review as approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912189387 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852#pullrequestreview-5912189387). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T18:30:38Z. **Review:** COMMENTED --- # Reviewed — comments The changed hazard tracking and in-place atomic binding paths were inspected at head `353c2960b77db373b419f1ddb5989e8477536251`; material parts of the change remain unverified because several changed files were too large to include in the review folder. ## What I ran No tests or build commands were run. I read the prepared description, commit list, manifest, diff, and targeted source ranges with `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted code review | not run | Review remains incomplete | | Tests and build | not run | Author reports focused tests; not independently verified | ## Findings ### Blocking None verified in the code inspected. ### Non-blocking None. ## Not verified Full text was available and inspected selectively for `GuestBufferMemory.hpp`, `PassHazards.hpp`, `ShaderResources.hpp`, `Draw.cpp`, `PassHazards.cpp`, `PassHazards.cpp` tests, `ShaderDiskCache.cpp` tests, the atomic-pass CMake test, and the new `AtomicPasses.cpp` test. Targeted ranges were read for the excluded full-text files `GuestBufferMemory.cpp`, `ShaderResources.cpp`, and `Recorder.cpp` tests; their complete contents were not read. The remaining changed files listed in the manifest were not read. The reported test runs, performance results, other GPUs, and other titles were not independently verified. ## To get this to a good state Nothing is required. Optional: complete review of the remaining changed files and run the focused tests on this head before treating the review as approval.
MarcZX10 commented 2026-11-18 18:29:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T18:29:50Z.

Review: COMMENTED


Reviewed — no blocking findings

The review artifacts and repository files could not be read in this environment, so the change is not verified and a formal decision is not justified.

What I ran

No repository reader command was available to run.

Results

Check Result Note
Review artifact inspection not run Reader unavailable
Code audit not run Changed files not inspected

Findings

Blocking

None verified.

Non-blocking

None.

Not verified

The change description, commits, diff, manifest, changed-file contents, and files reviewed count were not available for inspection.

To get this to a good state

Provide access to repo_read.py and the prepared review artifacts so the change can be reviewed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5962708605 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852#pullrequestreview-5962708605). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T18:29:50Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The review artifacts and repository files could not be read in this environment, so the change is not verified and a formal decision is not justified. ## What I ran No repository reader command was available to run. ## Results | Check | Result | Note | |---|---|---| | Review artifact inspection | not run | Reader unavailable | | Code audit | not run | Changed files not inspected | ## Findings ### Blocking None verified. ### Non-blocking None. ## Not verified The change description, commits, diff, manifest, changed-file contents, and files reviewed count were not available for inspection. ## To get this to a good state Provide access to `repo_read.py` and the prepared review artifacts so the change can be reviewed.
MarcZX10 commented 2026-11-19 09:27:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T09:27:52Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this review; the behavior claims and relevant code paths inspected support merging.

What I ran

Reviewed head 5c77b5d421f36c8b1be491f73af00c96d826a59a through the pinned repo_read.py interface. No build or tests were run in this review; the focused test results in the PR description are author-reported.

Results

Check Result Note
Prepared diff and metadata passed Claims align with the inspected change
Targeted source review passed Pass hazards and in-place binding traced
Build and tests not run Author reports focused tests

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of GuestBufferMemory.cpp, ShaderResources.cpp, and Recorder.cpp was not read; only relevant ranges and callers were inspected. The changed test files were not all read, and no tests were run. Performance measurements, other GPU vendors, and other titles were not independently verified. Files excluded by the prepared review manifest were GuestBufferMemory.cpp, ShaderResources.cpp, and Recorder.cpp as full-text artifacts; their relevant changed ranges were read via the pinned reader. All other changed files listed in the manifest were included in the review folder, but not every full file was read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5972400531 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852#pullrequestreview-5972400531). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T09:27:52Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this review; the behavior claims and relevant code paths inspected support merging. ## What I ran Reviewed head `5c77b5d421f36c8b1be491f73af00c96d826a59a` through the pinned `repo_read.py` interface. No build or tests were run in this review; the focused test results in the PR description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Prepared diff and metadata | passed | Claims align with the inspected change | | Targeted source review | passed | Pass hazards and in-place binding traced | | Build and tests | not run | Author reports focused tests | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of `GuestBufferMemory.cpp`, `ShaderResources.cpp`, and `Recorder.cpp` was not read; only relevant ranges and callers were inspected. The changed test files were not all read, and no tests were run. Performance measurements, other GPU vendors, and other titles were not independently verified. Files excluded by the prepared review manifest were `GuestBufferMemory.cpp`, `ShaderResources.cpp`, and `Recorder.cpp` as full-text artifacts; their relevant changed ranges were read via the pinned reader. All other changed files listed in the manifest were included in the review folder, but not every full file was read. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 05:48:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:48:24Z.

Review: COMMENTED


Reviewed — no blocking findings

The review is incomplete because the prepared review materials could not be read in this environment.

What I ran

No commands run. The required reader and review folder were unavailable through the available tools.

Results

Check Result Note
Review materials not run Not accessible
Tests not run Not run

Findings

Blocking

None verified.

Non-blocking

None.

Not verified

The PR description, commits, diff, manifest, changed files, and repository context were not read. No findings can be substantiated.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003282238 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9852#pullrequestreview-6003282238). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T05:48:24Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The review is incomplete because the prepared review materials could not be read in this environment. ## What I ran No commands run. The required reader and review folder were unavailable through the available tools. ## Results | Check | Result | Note | |---|---|---| | Review materials | not run | Not accessible | | Tests | not run | Not run | ## Findings ### Blocking None verified. ### Non-blocking None. ## Not verified The PR description, commits, diff, manifest, changed files, and repository context were not read. No findings can be substantiated. ## To get this to a good state Nothing is required.
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/9852:upstream-pr/9852'
git switch 'upstream-pr/9852'

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