perf(agc): run first the library prebuilds of programs a submission binds #13667

Merged
chitters2004 merged 4 commits from upstream-pr/13667 into main 2026-10-31 11:52:53 +00:00
chitters2004 commented 2026-10-30 22:37:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by chitters2004 on 2026-10-30T22:37:04Z.


What

Library prebuilds run in FIFO order on the prebuild pool. On a GTA V (PPSA04263) cold boot that queue holds thousands of speculative prebuilds from resolved shader ABIs, about 9,000 at about 190 ms each, so the prebuild of a shader the next draw needs can sit behind a minute of work. The draw committer then builds the same library part synchronously. Attributing every committer part build on one boot, 15.1 s of 41.5 s came from a prebuild still queued when its draw arrived.

Each queued prebuild now carries its program address. Driver::Submit and Driver::executeRewindTail scan the copied commands for the program address registers written by SET_SH_REG and SET_SH_REG_INDIRECT lists, and move matching prebuilds to the front, keeping their order. The tail scan matters because this title streams most of its draws through REWIND tails, which never pass through Submit. In Submit the promotion runs after AwaitRegistrationPreparation, so prebuilds queued during that wait are included.

The scan is a potentially inaccurate scheduling hint. A pair split across submissions uses the last high half seen, predicated writes are read as if taken, and when no tagged prebuild is waiting the scan is skipped, so the retained high half can be stale. An approximate address can match a different queued program and move that prebuild forward. The pool keeps the same tasks and their order within each group, and draw behaviour does not change.

When no tagged prebuild is waiting, for example after the pool drains or with library prebuilding off, a submission pays one relaxed atomic load and no scan. Addresses are sorted and deduplicated once per submission, and the queue tests membership by binary search.

Overlap: #6867 scans the same registers at submit to narrow the registration wait. This PR orders a different queue (the library prebuild pool) and adds no wait. Whichever lands second can share one scanner; #6867's rejects partial pairs and omits 0x048, which this needs.

The debt entry for prebuilt libraries still said one background thread; it now says the pool.

Tested

Windows 11, AMD Ryzen 7 5800X, NVIDIA GeForce RTX 3080, driver 621.01, Release, GTA V PPSA04263, same pad input, in one session on the same machine. Every run below is this PR's exact head a7c1dfcd01 or its base. A is e8efeed58a + #11580 (b479f93c7a08); B is A + this PR (207067f9c900). #11580 is on both sides because main stops at Story load (#11425); this PR does not depend on it.

Cold boots with empty shader and driver caches, alternating A, B, A, B, then a third A to rebuild its cache for the warm run. This is the claim of the PR, so these are cold by design, unlike the warm captures the Performance report form asks for.

A1 B1 A2 B2 A3
Story load to gameplay 51.4 s 41.0 s 53.2 s 40.3 s 55.1 s
Longest frame in early gameplay 7.5 s 5.9 s 7.0 s 5.9 s 6.8 s
Early gameplay fps (prebuilds still draining) 4.8 5.2 5.4 5.2 5.0
Trace window after the drain, frame p50 103.7 ms 105.5 ms 103.7 ms 104.4 ms 106.8 ms

Story load to gameplay falls by about 13 s, from 53.2 s to 40.7 s on average, and the longest frame by about 1.3 s. Fps while draining and steady frame time are unchanged within noise, and after the drain both sides stay CPU-bound on the draw committer (78 % busy, GPU busy about 36 ms per present).

Warm captures as the form describes: the scene ran once, the title was restarted on that cache, and the window is 12 s of gameplay. This shows the change costs nothing once caches are warm; it is not expected to help there.

A B
Frame p50 / p90 / p99 104.3 / 110.9 / 117.1 ms 103.8 / 120.9 / 129.0 ms
GPU busy 35.7 ms 36.2 ms

The higher p90 and p99 in this 12 s window do not repeat over longer stretches: averaging the 10 s intervals from 100 s on, a first warm pair over about 80 s gave p50 109.0 and 106.0 ms, p90 114.3 and 111.9 ms, p99 138.4 and 138.6 ms for A and B, and this pair over about 30 s gave p50 105.1 and 103.6 ms, p90 112.2 and 114.0 ms, p99 143.2 and 138.3 ms. tools/performance_compare.py, which reports differences and no verdict:

# Performance comparison

| Capture | Commit | Trace | Presents | Window (ms) |
| --- | --- | --- | ---: | ---: |
| baseline | b479f93c7a08 | aps5-trace-b479f93c7a08-24628.json.gz | 114 | 12008.840 |
| candidate | 207067f9c900 | aps5-trace-207067f9c900-17624.json.gz | 112 | 12025.243 |

- Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
- Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
- A missing top phase is unreported, not zero; its change is unavailable.
- baseline: trace events were dropped; the event trace omits some of the work included in phase totals.
- candidate: trace events were dropped; the event trace omits some of the work included in phase totals.

## Frame and GPU times (ms)

| Metric | Baseline | Candidate | Change | Change (%) |
| --- | ---: | ---: | ---: | ---: |
| frame_ms.p50 | 104.303 | 103.791 | -0.512 | -0.491 |
| frame_ms.p90 | 110.863 | 120.869 | +10.006 | +9.026 |
| frame_ms.p99 | 117.075 | 129.006 | +11.931 | +10.191 |
| frame_ms.max | 117.874 | 131.329 | +13.455 | +11.415 |
| mean_frame_ms | 105.341 | 107.368 | +2.028 | +1.925 |
| gpu_busy_ms_per_present | 35.745 | 36.199 | +0.454 | +1.270 |

## Top phases (ms per frame)

| Metric | Baseline | Candidate | Change | Change (%) |
| --- | ---: | ---: | ---: | ---: |
| Driver.Draw | 79.505 | 80.765 | +1.260 | +1.585 |
| Driver.Draw.draw_enqueued | 46.661 | 47.077 | +0.416 | +0.892 |
| Driver.Draw.shader_compile_and_link | 25.101 | 25.759 | +0.658 | +2.621 |
| Driver.Packet | 99.224 | 100.912 | +1.688 | +1.701 |
| Driver.Packet.draw | 79.970 | 81.257 | +1.287 | +1.609 |
| Graphics.Draw | 85.325 | 86.723 | +1.398 | +1.638 |
| Graphics.Draw.draw_and_resource_release | 73.952 | 75.331 | +1.379 | +1.865 |
| Shader.DrawStage | 19.132 | 19.494 | +0.362 | +1.892 |

Deviations from the form: the log is redirected and frames are dumped on every run, because the script that drives the menus reads both, so the two sides pay the same cost. The cold boots add APS5_TRACE_SECONDS for the window after the drain. Trace buffers reported dropped events on every run, at the default APS5_TRACE_EVENTS.

Overhead, measured inside agc_driver_library_prebuild_priority on a7c1dfcd01 with a temporary timer that is not committed. These are synthetic CPU measurements on this machine, using the reviewed worst case of 32,000 distinct binds in 128,000 dwords against 9,000 queued tagged prebuilds:

case scan queue lock held
32,000 distinct binds, 9,000 queued 2.1 ms 0.44 ms
1 bind, 2 queued under 0.01 ms under 0.01 ms
no tagged prebuild waiting skipped not taken

aps5-summary.jsonl lines, warm A and warm B, then cold A2 and cold B2:

{"commit":"b479f93c7a08","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 120:12","first_present":3439,"ms":12008.840},"presents":114,"frame_ms":{"p50":104.303,"p90":110.863,"p99":117.075,"max":117.874},"gpu_busy_ms_per_present":35.745,"worker_busy_pct":{"queue worker 0x0":98.305},"top_phases_ms_per_frame":{"Driver.Packet":99.224,"Graphics.Draw":85.325,"Driver.Packet.draw":79.970,"Driver.Draw":79.505,"Graphics.Draw.draw_and_resource_release":73.952,"Driver.Draw.draw_enqueued":46.661,"Driver.Draw.shader_compile_and_link":25.101,"Shader.DrawStage":19.132},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.934,"events_lost":194776,"totals_full":false}},"trace":"aps5-trace-b479f93c7a08-24628.json.gz"}
{"commit":"207067f9c900","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 120:12","first_present":3470,"ms":12025.243},"presents":112,"frame_ms":{"p50":103.791,"p90":120.869,"p99":129.006,"max":131.329},"gpu_busy_ms_per_present":36.199,"worker_busy_pct":{"queue worker 0x0":98.244},"top_phases_ms_per_frame":{"Driver.Packet":100.912,"Graphics.Draw":86.723,"Driver.Packet.draw":81.257,"Driver.Draw":80.765,"Graphics.Draw.draw_and_resource_release":75.331,"Driver.Draw.draw_enqueued":47.077,"Driver.Draw.shader_compile_and_link":25.759,"Shader.DrawStage":19.494},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.057,"events_lost":192965,"totals_full":false}},"trace":"aps5-trace-207067f9c900-17624.json.gz"}
{"commit":"b479f93c7a08","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"315:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 315:12","first_present":3555,"ms":12033.959},"presents":115,"frame_ms":{"p50":103.739,"p90":107.392,"p99":129.211,"max":159.932},"gpu_busy_ms_per_present":35.060,"worker_busy_pct":{"queue worker 0x0":98.221},"top_phases_ms_per_frame":{"Driver.Packet":98.334,"Graphics.Draw":83.967,"Driver.Packet.draw":79.294,"Driver.Draw":78.829,"Graphics.Draw.draw_and_resource_release":72.274,"Driver.Draw.draw_enqueued":45.323,"Driver.Draw.shader_compile_and_link":25.685,"Shader.DrawStage":19.553},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.741,"events_lost":202434,"totals_full":false}},"trace":"aps5-trace-b479f93c7a08-25288.json.gz"}
{"commit":"207067f9c900","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"315:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 315:12","first_present":3608,"ms":12063.554},"presents":114,"frame_ms":{"p50":104.431,"p90":109.896,"p99":115.954,"max":176.325},"gpu_busy_ms_per_present":35.523,"worker_busy_pct":{"queue worker 0x0":98.207},"top_phases_ms_per_frame":{"Driver.Packet":98.867,"Graphics.Draw":84.722,"Driver.Packet.draw":79.514,"Driver.Draw":79.025,"Graphics.Draw.draw_and_resource_release":73.525,"Driver.Draw.draw_enqueued":45.235,"Driver.Draw.shader_compile_and_link":26.002,"Shader.DrawStage":19.886},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.833,"events_lost":198910,"totals_full":false}},"trace":"aps5-trace-207067f9c900-25404.json.gz"}

Traces: warm A, warm B, cold A2, cold B2.

tools/trace_digest.py summaries:

Cold A2

20 intervals, 0.0 to 324.6 s, 3647 presents
NVIDIA GeForce RTX 3080, NVIDIA 621.01, Windows 10.0.26220, 3840x2160, commit b479f93c7a08

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 22 33.4 60.7 9108.9 9108.9 7.7 1 % Shader.PrepareArtifact 3365.6
2 10-20 295 33.6 35.2 47.4 50.1 6.2 6 % Vulkan.GraphicsPipelinePrebuild 249.9
3 20-105 129 33.7 34.8 43.0 81086.3 6.4 0 % Vulkan.GraphicsPipelinePrebuild 5367.9
4 105-115 180 33.5 34.8 1499.6 2168.9 1.9 44 % Vulkan.GraphicsPipeline 431.7
5 115-125 344 33.4 34.5 35.5 91.9 0.9 51 % Vulkan.GraphicsPipelinePrebuild 233.3
6 125-135 600 16.7 16.9 17.6 17.9 0.5 99 % Vulkan.GraphicsPipelinePrebuild 137.7
7 135-145 597 16.7 16.9 17.3 67.6 1.2 99 % Vulkan.GraphicsPipelinePrebuild 133.3
8 145-155 475 16.7 34.1 57.8 170.8 1.4 67 % Vulkan.GraphicsPipelinePrebuild 170.5
9 155-211 396 16.8 34.6 67.0 46761.9 0.3 94 % Vulkan.GraphicsPipeline 1192.3
10 211-222 13 334.9 1991.2 3342.4 3342.4 42.6 100 % Vulkan.GraphicsPipeline 7298.6
11 222-233 12 952.5 1907.7 2813.2 2813.2 44.1 100 % Vulkan.GraphicsPipeline 8126.0
12 233-244 8 192.2 7037.4 7037.4 7037.4 41.8 100 % Vulkan.GraphicsPipeline 12209.2
13 244-254 67 122.0 182.7 1583.1 1583.1 38.8 99 % Vulkan.GraphicsPipeline 1138.4
14 254-264 15 175.1 2970.9 3042.5 3042.5 45.1 100 % Vulkan.GraphicsPipeline 6190.9
15 264-274 58 104.7 143.4 1425.5 1425.5 36.3 99 % Vulkan.GraphicsPipeline 1427.5
16 274-284 54 154.4 192.7 1447.0 1447.0 39.5 99 % Vulkan.GraphicsPipeline 1589.4
17 284-294 93 104.1 119.7 165.2 165.2 36.3 98 % Vulkan.GraphicsPipelinePrebuild 158.2
18 294-305 96 103.4 109.1 168.2 168.2 35.4 98 % Driver.Packet 98.6
19 305-315 96 103.9 108.4 117.6 117.6 35.5 98 % Driver.Packet 97.9
20 315-325 (dropped) 97 103.3 106.3 111.2 111.2 35.2 98 % Driver.Packet 97.2
p99 ms  @.._.....--#:-__....  0-9108.9
gpu ms  :__......@@%%@#%####  0-45.1
Cold B2

21 intervals, 0.0 to 323.2 s, 3685 presents
NVIDIA GeForce RTX 3080, NVIDIA 621.01, Windows 10.0.26220, 3840x2160, commit 207067f9c900

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-10 38 33.4 35.3 8560.3 8560.3 7.0 1 % Vulkan.GraphicsPipelinePrebuild 1876.7
2 10-20 296 33.6 34.8 37.1 46.6 6.3 5 % Vulkan.GraphicsPipelinePrebuild 289.6
3 20-106 114 33.7 35.1 42.5 81786.6 6.3 0 % Vulkan.GraphicsPipelinePrebuild 5950.5
4 106-116 174 33.7 34.9 1555.6 2272.6 1.8 45 % Vulkan.GraphicsPipeline 491.8
5 116-126 335 33.3 34.4 35.5 89.8 1.0 51 % Vulkan.GraphicsPipelinePrebuild 233.8
6 126-136 600 16.7 16.9 17.2 17.5 0.5 96 % Vulkan.GraphicsPipelinePrebuild 134.5
7 136-146 597 16.7 16.9 17.4 68.4 1.2 96 % Vulkan.GraphicsPipelinePrebuild 130.2
8 146-156 486 16.7 34.2 59.2 153.3 1.6 68 % Vulkan.GraphicsPipelinePrebuild 171.1
9 156-199 397 16.8 34.8 55.8 34300.6 0.3 91 % Vulkan.GraphicsPipeline 900.6
10 199-210 13 320.8 1854.9 3216.2 3216.2 43.7 100 % Vulkan.GraphicsPipeline 7552.9
11 210-221 6 2187.6 2582.6 2582.6 2582.6 44.9 100 % Vulkan.GraphicsPipeline 16078.7
12 221-233 14 120.6 2185.6 5898.7 5898.7 42.4 100 % Vulkan.GraphicsPipeline 7499.2
13 233-243 69 124.1 185.0 1135.7 1135.7 39.3 99 % Vulkan.GraphicsPipeline 1182.4
14 243-253 22 182.9 1161.7 2983.3 2983.3 41.1 99 % Vulkan.GraphicsPipeline 4074.6
15 253-263 55 110.2 175.9 1476.5 1476.5 36.6 99 % Vulkan.GraphicsPipeline 1394.2
16 263-273 53 157.9 174.2 1557.1 1557.1 40.4 99 % Vulkan.GraphicsPipeline 1622.5
17 273-283 60 165.1 183.0 228.8 228.8 40.8 98 % Vulkan.GraphicsPipelinePrebuild 1356.6
18 283-293 70 151.0 171.0 183.8 183.8 39.1 98 % Vulkan.GraphicsPipelinePrebuild 1012.1
19 293-303 94 104.9 112.2 162.0 162.0 35.8 98 % Driver.Packet 100.3
20 303-313 96 104.4 108.6 113.0 113.0 35.5 98 % Driver.Packet 98.2
21 313-323 (dropped) 96 104.5 109.9 116.0 116.0 35.3 98 % Driver.Packet 98.3
p99 ms  @..:.....--*_-::.....  0-8560.3
gpu ms  ___......@@@%%#%%%###  0-44.9

agc_driver_library_prebuild_priority is new: it blocks the pool, queues two tagged prebuilds and checks the bound one runs first for a pixel pair, a low-only rebind with a retained high half, and the legacy vertex pair, and that binding another program keeps FIFO order. It also runs a 32,000-bind submission against a 9,000-task backlog, checks that the bound prebuild runs first, that no task is lost or repeated and that the rest keep their order, that an unused or drained pool reports nothing waiting, and that a submission with no prebuild waiting is not scanned. That last check fails when the guard is removed, and the first ones fail with promotion disabled.

Paired validation of a7c1dfcd01 merged into main (9d4f66d0af) against main at 21668cc9d8, on the same machine and GPU with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, pattern agc_driver_prepared|library_prebuild|compute_prebuild|frame_replay|frame_capture: 43 of 43 pass on the change and 42 of 42 on main, the extra one being the new test. No log contains was not found but was requested by env var VK_INSTANCE_LAYERS. Both logs hold the same 14 VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 lines, so the change adds no new VUID- errors.

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 GeForce RTX 3080, driver 621.01, Windows 11
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5091929914 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13667). Originally posted by [chitters2004](https://github.com/chitters2004) on 2026-10-30T22:37:04Z. --- ### What Library prebuilds run in FIFO order on the prebuild pool. On a GTA V (PPSA04263) cold boot that queue holds thousands of speculative prebuilds from resolved shader ABIs, about 9,000 at about 190 ms each, so the prebuild of a shader the next draw needs can sit behind a minute of work. The draw committer then builds the same library part synchronously. Attributing every committer part build on one boot, 15.1 s of 41.5 s came from a prebuild still queued when its draw arrived. Each queued prebuild now carries its program address. `Driver::Submit` and `Driver::executeRewindTail` scan the copied commands for the program address registers written by `SET_SH_REG` and `SET_SH_REG_INDIRECT` lists, and move matching prebuilds to the front, keeping their order. The tail scan matters because this title streams most of its draws through REWIND tails, which never pass through `Submit`. In `Submit` the promotion runs after `AwaitRegistrationPreparation`, so prebuilds queued during that wait are included. The scan is a potentially inaccurate scheduling hint. A pair split across submissions uses the last high half seen, predicated writes are read as if taken, and when no tagged prebuild is waiting the scan is skipped, so the retained high half can be stale. An approximate address can match a different queued program and move that prebuild forward. The pool keeps the same tasks and their order within each group, and draw behaviour does not change. When no tagged prebuild is waiting, for example after the pool drains or with library prebuilding off, a submission pays one relaxed atomic load and no scan. Addresses are sorted and deduplicated once per submission, and the queue tests membership by binary search. Overlap: #6867 scans the same registers at submit to narrow the registration wait. This PR orders a different queue (the library prebuild pool) and adds no wait. Whichever lands second can share one scanner; #6867's rejects partial pairs and omits `0x048`, which this needs. The debt entry for prebuilt libraries still said one background thread; it now says the pool. ### Tested <!-- 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. --> Windows 11, AMD Ryzen 7 5800X, NVIDIA GeForce RTX 3080, driver 621.01, Release, GTA V PPSA04263, same pad input, in one session on the same machine. Every run below is this PR's exact head `a7c1dfcd01` or its base. A is `e8efeed58a` + #11580 (`b479f93c7a08`); B is A + this PR (`207067f9c900`). #11580 is on both sides because `main` stops at Story load (#11425); this PR does not depend on it. Cold boots with empty shader and driver caches, alternating A, B, A, B, then a third A to rebuild its cache for the warm run. This is the claim of the PR, so these are cold by design, unlike the warm captures the Performance report form asks for. | | A1 | B1 | A2 | B2 | A3 | |---|---|---|---|---|---| | Story load to gameplay | 51.4 s | 41.0 s | 53.2 s | 40.3 s | 55.1 s | | Longest frame in early gameplay | 7.5 s | 5.9 s | 7.0 s | 5.9 s | 6.8 s | | Early gameplay fps (prebuilds still draining) | 4.8 | 5.2 | 5.4 | 5.2 | 5.0 | | Trace window after the drain, frame p50 | 103.7 ms | 105.5 ms | 103.7 ms | 104.4 ms | 106.8 ms | Story load to gameplay falls by about 13 s, from 53.2 s to 40.7 s on average, and the longest frame by about 1.3 s. Fps while draining and steady frame time are unchanged within noise, and after the drain both sides stay CPU-bound on the draw committer (78 % busy, GPU busy about 36 ms per present). Warm captures as the form describes: the scene ran once, the title was restarted on that cache, and the window is 12 s of gameplay. This shows the change costs nothing once caches are warm; it is not expected to help there. | | A | B | |---|---|---| | Frame p50 / p90 / p99 | 104.3 / 110.9 / 117.1 ms | 103.8 / 120.9 / 129.0 ms | | GPU busy | 35.7 ms | 36.2 ms | The higher p90 and p99 in this 12 s window do not repeat over longer stretches: averaging the 10 s intervals from 100 s on, a first warm pair over about 80 s gave p50 109.0 and 106.0 ms, p90 114.3 and 111.9 ms, p99 138.4 and 138.6 ms for A and B, and this pair over about 30 s gave p50 105.1 and 103.6 ms, p90 112.2 and 114.0 ms, p99 143.2 and 138.3 ms. `tools/performance_compare.py`, which reports differences and no verdict: ``` # Performance comparison | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | b479f93c7a08 | aps5-trace-b479f93c7a08-24628.json.gz | 114 | 12008.840 | | candidate | 207067f9c900 | aps5-trace-207067f9c900-17624.json.gz | 112 | 12025.243 | - Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - baseline: trace events were dropped; the event trace omits some of the work included in phase totals. - candidate: trace events were dropped; the event trace omits some of the work included in phase totals. ## Frame and GPU times (ms) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 104.303 | 103.791 | -0.512 | -0.491 | | frame_ms.p90 | 110.863 | 120.869 | +10.006 | +9.026 | | frame_ms.p99 | 117.075 | 129.006 | +11.931 | +10.191 | | frame_ms.max | 117.874 | 131.329 | +13.455 | +11.415 | | mean_frame_ms | 105.341 | 107.368 | +2.028 | +1.925 | | gpu_busy_ms_per_present | 35.745 | 36.199 | +0.454 | +1.270 | ## Top phases (ms per frame) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Draw | 79.505 | 80.765 | +1.260 | +1.585 | | Driver.Draw.draw_enqueued | 46.661 | 47.077 | +0.416 | +0.892 | | Driver.Draw.shader_compile_and_link | 25.101 | 25.759 | +0.658 | +2.621 | | Driver.Packet | 99.224 | 100.912 | +1.688 | +1.701 | | Driver.Packet.draw | 79.970 | 81.257 | +1.287 | +1.609 | | Graphics.Draw | 85.325 | 86.723 | +1.398 | +1.638 | | Graphics.Draw.draw_and_resource_release | 73.952 | 75.331 | +1.379 | +1.865 | | Shader.DrawStage | 19.132 | 19.494 | +0.362 | +1.892 | ``` Deviations from the form: the log is redirected and frames are dumped on every run, because the script that drives the menus reads both, so the two sides pay the same cost. The cold boots add `APS5_TRACE_SECONDS` for the window after the drain. Trace buffers reported dropped events on every run, at the default `APS5_TRACE_EVENTS`. Overhead, measured inside `agc_driver_library_prebuild_priority` on `a7c1dfcd01` with a temporary timer that is not committed. These are synthetic CPU measurements on this machine, using the reviewed worst case of 32,000 distinct binds in 128,000 dwords against 9,000 queued tagged prebuilds: | case | scan | queue lock held | |---|---|---| | 32,000 distinct binds, 9,000 queued | 2.1 ms | 0.44 ms | | 1 bind, 2 queued | under 0.01 ms | under 0.01 ms | | no tagged prebuild waiting | skipped | not taken | `aps5-summary.jsonl` lines, warm A and warm B, then cold A2 and cold B2: ```json {"commit":"b479f93c7a08","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 120:12","first_present":3439,"ms":12008.840},"presents":114,"frame_ms":{"p50":104.303,"p90":110.863,"p99":117.075,"max":117.874},"gpu_busy_ms_per_present":35.745,"worker_busy_pct":{"queue worker 0x0":98.305},"top_phases_ms_per_frame":{"Driver.Packet":99.224,"Graphics.Draw":85.325,"Driver.Packet.draw":79.970,"Driver.Draw":79.505,"Graphics.Draw.draw_and_resource_release":73.952,"Driver.Draw.draw_enqueued":46.661,"Driver.Draw.shader_compile_and_link":25.101,"Shader.DrawStage":19.132},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.934,"events_lost":194776,"totals_full":false}},"trace":"aps5-trace-b479f93c7a08-24628.json.gz"} {"commit":"207067f9c900","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 120:12","first_present":3470,"ms":12025.243},"presents":112,"frame_ms":{"p50":103.791,"p90":120.869,"p99":129.006,"max":131.329},"gpu_busy_ms_per_present":36.199,"worker_busy_pct":{"queue worker 0x0":98.244},"top_phases_ms_per_frame":{"Driver.Packet":100.912,"Graphics.Draw":86.723,"Driver.Packet.draw":81.257,"Driver.Draw":80.765,"Graphics.Draw.draw_and_resource_release":75.331,"Driver.Draw.draw_enqueued":47.077,"Driver.Draw.shader_compile_and_link":25.759,"Shader.DrawStage":19.494},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":7.057,"events_lost":192965,"totals_full":false}},"trace":"aps5-trace-207067f9c900-17624.json.gz"} {"commit":"b479f93c7a08","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"315:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 315:12","first_present":3555,"ms":12033.959},"presents":115,"frame_ms":{"p50":103.739,"p90":107.392,"p99":129.211,"max":159.932},"gpu_busy_ms_per_present":35.060,"worker_busy_pct":{"queue worker 0x0":98.221},"top_phases_ms_per_frame":{"Driver.Packet":98.334,"Graphics.Draw":83.967,"Driver.Packet.draw":79.294,"Driver.Draw":78.829,"Graphics.Draw.draw_and_resource_release":72.274,"Driver.Draw.draw_enqueued":45.323,"Driver.Draw.shader_compile_and_link":25.685,"Shader.DrawStage":19.553},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.741,"events_lost":202434,"totals_full":false}},"trace":"aps5-trace-b479f93c7a08-25288.json.gz"} {"commit":"207067f9c900","dirty":false,"env":{"APS5_DUMP_FRAMES":"80","APS5_DUMP_FRAMES_EVERY":"300","APS5_LOG_TIMESTAMPS":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"315:12","APS5_TRACE_SUMMARY_EVERY":"10","APS5_VIDEOOUT_TELEMETRY_DIR":"<path>"},"gpu":"NVIDIA GeForce RTX 3080","driver":"NVIDIA 621.01","os":"Windows 10.0.26220","cpu":"AMD Ryzen 7 5800X 8-Core Processor","cpu_threads":16,"memory_mib":32676,"title_id":"PPSA04263","title":"Grand Theft Auto V","content_version":"01.011.001","resolution":"3840x2160","window":{"spec":"seconds 315:12","first_present":3608,"ms":12063.554},"presents":114,"frame_ms":{"p50":104.431,"p90":109.896,"p99":115.954,"max":176.325},"gpu_busy_ms_per_present":35.523,"worker_busy_pct":{"queue worker 0x0":98.207},"top_phases_ms_per_frame":{"Driver.Packet":98.867,"Graphics.Draw":84.722,"Driver.Packet.draw":79.514,"Driver.Draw":79.025,"Graphics.Draw.draw_and_resource_release":73.525,"Driver.Draw.draw_enqueued":45.235,"Driver.Draw.shader_compile_and_link":26.002,"Shader.DrawStage":19.886},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.833,"events_lost":198910,"totals_full":false}},"trace":"aps5-trace-207067f9c900-25404.json.gz"} ``` Traces: warm [A](https://github.com/chitters2004/AnyPS5/releases/download/pr13667-traces/aps5-trace-b479f93c7a08-24628.json.gz), warm [B](https://github.com/chitters2004/AnyPS5/releases/download/pr13667-traces/aps5-trace-207067f9c900-17624.json.gz), cold [A2](https://github.com/chitters2004/AnyPS5/releases/download/pr13667-traces/aps5-trace-b479f93c7a08-25288.json.gz), cold [B2](https://github.com/chitters2004/AnyPS5/releases/download/pr13667-traces/aps5-trace-207067f9c900-25404.json.gz). `tools/trace_digest.py` summaries: <details><summary>Cold A2</summary> **20 intervals**, 0.0 to 324.6 s, 3647 presents NVIDIA GeForce RTX 3080, NVIDIA 621.01, Windows 10.0.26220, 3840x2160, commit b479f93c7a08 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 22 | 33.4 | 60.7 | 9108.9 | 9108.9 | 7.7 | 1 % | Shader.PrepareArtifact 3365.6 | | 2 | 10-20 | 295 | 33.6 | 35.2 | 47.4 | 50.1 | 6.2 | 6 % | Vulkan.GraphicsPipelinePrebuild 249.9 | | 3 | 20-105 | 129 | 33.7 | 34.8 | 43.0 | 81086.3 | 6.4 | 0 % | Vulkan.GraphicsPipelinePrebuild 5367.9 | | 4 | 105-115 | 180 | 33.5 | 34.8 | 1499.6 | 2168.9 | 1.9 | 44 % | Vulkan.GraphicsPipeline 431.7 | | 5 | 115-125 | 344 | 33.4 | 34.5 | 35.5 | 91.9 | 0.9 | 51 % | Vulkan.GraphicsPipelinePrebuild 233.3 | | 6 | 125-135 | 600 | 16.7 | 16.9 | 17.6 | 17.9 | 0.5 | 99 % | Vulkan.GraphicsPipelinePrebuild 137.7 | | 7 | 135-145 | 597 | 16.7 | 16.9 | 17.3 | 67.6 | 1.2 | 99 % | Vulkan.GraphicsPipelinePrebuild 133.3 | | 8 | 145-155 | 475 | 16.7 | 34.1 | 57.8 | 170.8 | 1.4 | 67 % | Vulkan.GraphicsPipelinePrebuild 170.5 | | 9 | 155-211 | 396 | 16.8 | 34.6 | 67.0 | 46761.9 | 0.3 | 94 % | Vulkan.GraphicsPipeline 1192.3 | | 10 | 211-222 | 13 | 334.9 | 1991.2 | 3342.4 | 3342.4 | 42.6 | 100 % | Vulkan.GraphicsPipeline 7298.6 | | 11 | 222-233 | 12 | 952.5 | 1907.7 | 2813.2 | 2813.2 | 44.1 | 100 % | Vulkan.GraphicsPipeline 8126.0 | | 12 | 233-244 | 8 | 192.2 | 7037.4 | 7037.4 | 7037.4 | 41.8 | 100 % | Vulkan.GraphicsPipeline 12209.2 | | 13 | 244-254 | 67 | 122.0 | 182.7 | 1583.1 | 1583.1 | 38.8 | 99 % | Vulkan.GraphicsPipeline 1138.4 | | 14 | 254-264 | 15 | 175.1 | 2970.9 | 3042.5 | 3042.5 | 45.1 | 100 % | Vulkan.GraphicsPipeline 6190.9 | | 15 | 264-274 | 58 | 104.7 | 143.4 | 1425.5 | 1425.5 | 36.3 | 99 % | Vulkan.GraphicsPipeline 1427.5 | | 16 | 274-284 | 54 | 154.4 | 192.7 | 1447.0 | 1447.0 | 39.5 | 99 % | Vulkan.GraphicsPipeline 1589.4 | | 17 | 284-294 | 93 | 104.1 | 119.7 | 165.2 | 165.2 | 36.3 | 98 % | Vulkan.GraphicsPipelinePrebuild 158.2 | | 18 | 294-305 | 96 | 103.4 | 109.1 | 168.2 | 168.2 | 35.4 | 98 % | Driver.Packet 98.6 | | 19 | 305-315 | 96 | 103.9 | 108.4 | 117.6 | 117.6 | 35.5 | 98 % | Driver.Packet 97.9 | | 20 | 315-325 (dropped) | 97 | 103.3 | 106.3 | 111.2 | 111.2 | 35.2 | 98 % | Driver.Packet 97.2 | ``` p99 ms @.._.....--#:-__.... 0-9108.9 gpu ms :__......@@%%@#%#### 0-45.1 ``` </details> <details><summary>Cold B2</summary> **21 intervals**, 0.0 to 323.2 s, 3685 presents NVIDIA GeForce RTX 3080, NVIDIA 621.01, Windows 10.0.26220, 3840x2160, commit 207067f9c900 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 0-10 | 38 | 33.4 | 35.3 | 8560.3 | 8560.3 | 7.0 | 1 % | Vulkan.GraphicsPipelinePrebuild 1876.7 | | 2 | 10-20 | 296 | 33.6 | 34.8 | 37.1 | 46.6 | 6.3 | 5 % | Vulkan.GraphicsPipelinePrebuild 289.6 | | 3 | 20-106 | 114 | 33.7 | 35.1 | 42.5 | 81786.6 | 6.3 | 0 % | Vulkan.GraphicsPipelinePrebuild 5950.5 | | 4 | 106-116 | 174 | 33.7 | 34.9 | 1555.6 | 2272.6 | 1.8 | 45 % | Vulkan.GraphicsPipeline 491.8 | | 5 | 116-126 | 335 | 33.3 | 34.4 | 35.5 | 89.8 | 1.0 | 51 % | Vulkan.GraphicsPipelinePrebuild 233.8 | | 6 | 126-136 | 600 | 16.7 | 16.9 | 17.2 | 17.5 | 0.5 | 96 % | Vulkan.GraphicsPipelinePrebuild 134.5 | | 7 | 136-146 | 597 | 16.7 | 16.9 | 17.4 | 68.4 | 1.2 | 96 % | Vulkan.GraphicsPipelinePrebuild 130.2 | | 8 | 146-156 | 486 | 16.7 | 34.2 | 59.2 | 153.3 | 1.6 | 68 % | Vulkan.GraphicsPipelinePrebuild 171.1 | | 9 | 156-199 | 397 | 16.8 | 34.8 | 55.8 | 34300.6 | 0.3 | 91 % | Vulkan.GraphicsPipeline 900.6 | | 10 | 199-210 | 13 | 320.8 | 1854.9 | 3216.2 | 3216.2 | 43.7 | 100 % | Vulkan.GraphicsPipeline 7552.9 | | 11 | 210-221 | 6 | 2187.6 | 2582.6 | 2582.6 | 2582.6 | 44.9 | 100 % | Vulkan.GraphicsPipeline 16078.7 | | 12 | 221-233 | 14 | 120.6 | 2185.6 | 5898.7 | 5898.7 | 42.4 | 100 % | Vulkan.GraphicsPipeline 7499.2 | | 13 | 233-243 | 69 | 124.1 | 185.0 | 1135.7 | 1135.7 | 39.3 | 99 % | Vulkan.GraphicsPipeline 1182.4 | | 14 | 243-253 | 22 | 182.9 | 1161.7 | 2983.3 | 2983.3 | 41.1 | 99 % | Vulkan.GraphicsPipeline 4074.6 | | 15 | 253-263 | 55 | 110.2 | 175.9 | 1476.5 | 1476.5 | 36.6 | 99 % | Vulkan.GraphicsPipeline 1394.2 | | 16 | 263-273 | 53 | 157.9 | 174.2 | 1557.1 | 1557.1 | 40.4 | 99 % | Vulkan.GraphicsPipeline 1622.5 | | 17 | 273-283 | 60 | 165.1 | 183.0 | 228.8 | 228.8 | 40.8 | 98 % | Vulkan.GraphicsPipelinePrebuild 1356.6 | | 18 | 283-293 | 70 | 151.0 | 171.0 | 183.8 | 183.8 | 39.1 | 98 % | Vulkan.GraphicsPipelinePrebuild 1012.1 | | 19 | 293-303 | 94 | 104.9 | 112.2 | 162.0 | 162.0 | 35.8 | 98 % | Driver.Packet 100.3 | | 20 | 303-313 | 96 | 104.4 | 108.6 | 113.0 | 113.0 | 35.5 | 98 % | Driver.Packet 98.2 | | 21 | 313-323 (dropped) | 96 | 104.5 | 109.9 | 116.0 | 116.0 | 35.3 | 98 % | Driver.Packet 98.3 | ``` p99 ms @..:.....--*_-::..... 0-8560.3 gpu ms ___......@@@%%#%%%### 0-44.9 ``` </details> `agc_driver_library_prebuild_priority` is new: it blocks the pool, queues two tagged prebuilds and checks the bound one runs first for a pixel pair, a low-only rebind with a retained high half, and the legacy vertex pair, and that binding another program keeps FIFO order. It also runs a 32,000-bind submission against a 9,000-task backlog, checks that the bound prebuild runs first, that no task is lost or repeated and that the rest keep their order, that an unused or drained pool reports nothing waiting, and that a submission with no prebuild waiting is not scanned. That last check fails when the guard is removed, and the first ones fail with promotion disabled. Paired validation of `a7c1dfcd01` merged into `main` (`9d4f66d0af`) against `main` at `21668cc9d8`, on the same machine and GPU with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, pattern `agc_driver_prepared|library_prebuild|compute_prebuild|frame_replay|frame_capture`: 43 of 43 pass on the change and 42 of 42 on `main`, the extra one being the new test. No log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. Both logs hold the same 14 `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` lines, so the change adds no new `VUID-` errors. ### 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 GeForce RTX 3080, driver 621.01, Windows 11 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-30 22:47:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T22:47:17Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The code change appears focused, but this perf PR does not yet provide the repository-required, comparable main and exact-PR-head capture evidence.

What I ran

Reviewed head 01b6d0486948ea69614fa0cf945a5179e2604ab9 against PR base e8efeed58af48d0682ab2e0eab72cfaf996e4886; the stack/mergeability precheck passed. Environment: Linux x86-64, Python 3.11.2; no compiler, build, CTest, or GPU run was performed.

python3 /marc/AnyPS5/tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13667
git -C /marc/AnyPS5 diff --check e8efeed58af48d0682ab2e0eab72cfaf996e4886...refs/review/pr-13667-current
git -C /marc/AnyPS5 diff e8efeed58af48d0682ab2e0eab72cfaf996e4886...refs/review/pr-13667-current -- core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp core/libs/prx/libSceAgcDriver/tests/execution/LibraryPrebuildPriority.cpp
gh pr checks 13667 --repo boykopovar/AnyPS5

Results

Check Result
Diff and conventions Passed.
Source review The change extracts bound program addresses from PM4 register writes and promotes matching queued library prebuilds; the new test covers pixel, retained-high-half, legacy vertex, and unrelated-program ordering cases. No independent runtime test was run.
PR precheck Diff, conventions/template, and stack checks passed. ABI and test-quality helpers were unavailable in the isolated checkout; they did not produce source findings.
Hosted CI Eligibility, intake, labels, conventions, library-portability, and report passed. Windows remained pending; Linux and specialized jobs were skipped.
Performance evidence in the PR description The description contains digest-style tables, but not the two raw aps5-summary.jsonl records or links to attached trace files. It identifies the comparison as main + #11580 versus this PR + #11580; the stated commits (28a914225ed4 and c99f4eef257e) are not the current target base e8efeed58af48d0682ab2e0eab72cfaf996e4886 and exact PR head 01b6d0486948ea69614fa0cf945a5179e2604ab9. I could not run tools/trace_digest.py because no trace files were attached or linked.
Unedited output from checks

Conventions:

All conventions checks passed.

Hosted checks at the last refresh:

labels	pass	12s	https://github.com/boykopovar/AnyPS5/actions/runs/41139315813/job/124349423610
windows	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350525529
conventions	pass	15s	https://github.com/boykopovar/AnyPS5/actions/runs/41139315741/job/124349423684
library-portability	pass	1m18s	https://github.com/boykopovar/AnyPS5/actions/runs/41139316014/job/124349422640
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527141
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527436
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350526822
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527434
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527934
eligibility	pass	5s	https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124349422422
intake	pass	25s	https://github.com/boykopovar/AnyPS5/actions/runs/41139315740/job/124349423731
report	pass	34s	https://github.com/boykopovar/AnyPS5/actions/runs/41139315936/job/124349423034

git diff --check emitted no output and exited 0.

Findings

Blocking

The required performance evidence is incomplete and does not identify measurements for the current main target and exact PR head. Without the raw summary records and corresponding trace files, the reported improvement cannot be independently matched to this change or reproduced. Please paste the aps5-summary.jsonl line for a capture on current main and one for this exact PR head from the same title, scene, and machine; attach both traces; and include the unedited output of tools/trace_digest.py for each. If #11580 is needed to reach the scene, explain the dependency and provide a comparable baseline tied to the current target state.

Non-blocking

No source-level defect was confirmed from the reviewed diff.

Sources

Not verified

No local build, C++ test, Vulkan validation run, or GPU performance capture was run. Hosted Windows was pending; Linux and specialized jobs were skipped. The author-reported test and timing results were read from the PR description and were not independently reproduced.

To get this to a good state

Add the comparable current-main and exact-head performance artifacts described above. I will re-check their commit identities, machine/scene match, and digests, then re-run the same applicable checks on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719491553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13667#pullrequestreview-5719491553). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T22:47:17Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The code change appears focused, but this `perf` PR does not yet provide the repository-required, comparable `main` and exact-PR-head capture evidence. ## What I ran Reviewed head `01b6d0486948ea69614fa0cf945a5179e2604ab9` against PR base `e8efeed58af48d0682ab2e0eab72cfaf996e4886`; the stack/mergeability precheck passed. Environment: Linux x86-64, Python 3.11.2; no compiler, build, CTest, or GPU run was performed. ```sh python3 /marc/AnyPS5/tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13667 git -C /marc/AnyPS5 diff --check e8efeed58af48d0682ab2e0eab72cfaf996e4886...refs/review/pr-13667-current git -C /marc/AnyPS5 diff e8efeed58af48d0682ab2e0eab72cfaf996e4886...refs/review/pr-13667-current -- core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp core/libs/prx/libSceAgcDriver/tests/execution/LibraryPrebuildPriority.cpp gh pr checks 13667 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff and conventions | Passed. | | Source review | The change extracts bound program addresses from PM4 register writes and promotes matching queued library prebuilds; the new test covers pixel, retained-high-half, legacy vertex, and unrelated-program ordering cases. No independent runtime test was run. | | PR precheck | Diff, conventions/template, and stack checks passed. ABI and test-quality helpers were unavailable in the isolated checkout; they did not produce source findings. | | Hosted CI | Eligibility, intake, labels, conventions, library-portability, and report passed. Windows remained pending; Linux and specialized jobs were skipped. | | Performance evidence in the PR description | The description contains digest-style tables, but not the two raw `aps5-summary.jsonl` records or links to attached trace files. It identifies the comparison as `main + #11580` versus `this PR + #11580`; the stated commits (`28a914225ed4` and `c99f4eef257e`) are not the current target base `e8efeed58af48d0682ab2e0eab72cfaf996e4886` and exact PR head `01b6d0486948ea69614fa0cf945a5179e2604ab9`. I could not run `tools/trace_digest.py` because no trace files were attached or linked. | <details> <summary>Unedited output from checks</summary> Conventions: ```text All conventions checks passed. ``` Hosted checks at the last refresh: ```text labels pass 12s https://github.com/boykopovar/AnyPS5/actions/runs/41139315813/job/124349423610 windows pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350525529 conventions pass 15s https://github.com/boykopovar/AnyPS5/actions/runs/41139315741/job/124349423684 library-portability pass 1m18s https://github.com/boykopovar/AnyPS5/actions/runs/41139316014/job/124349422640 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527141 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527436 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350526822 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527434 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124350527934 eligibility pass 5s https://github.com/boykopovar/AnyPS5/actions/runs/41139315894/job/124349422422 intake pass 25s https://github.com/boykopovar/AnyPS5/actions/runs/41139315740/job/124349423731 report pass 34s https://github.com/boykopovar/AnyPS5/actions/runs/41139315936/job/124349423034 ``` `git diff --check` emitted no output and exited 0. </details> ## Findings ### Blocking The required performance evidence is incomplete and does not identify measurements for the current `main` target and exact PR head. Without the raw summary records and corresponding trace files, the reported improvement cannot be independently matched to this change or reproduced. Please paste the `aps5-summary.jsonl` line for a capture on current `main` and one for this exact PR head from the same title, scene, and machine; attach both traces; and include the unedited output of `tools/trace_digest.py` for each. If #11580 is needed to reach the scene, explain the dependency and provide a comparable baseline tied to the current target state. ### Non-blocking No source-level defect was confirmed from the reviewed diff. ## Sources - [Repository performance-report requirements at the PR base](https://github.com/boykopovar/AnyPS5/blob/e8efeed58af48d0682ab2e0eab72cfaf996e4886/CONTRIBUTING.md) - [Performance report form at the PR base](https://github.com/boykopovar/AnyPS5/blob/e8efeed58af48d0682ab2e0eab72cfaf996e4886/.github/ISSUE_TEMPLATE/performance.yml) - [Reviewed prebuild scheduling change](https://github.com/boykopovar/AnyPS5/blob/01b6d0486948ea69614fa0cf945a5179e2604ab9/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp) ## Not verified No local build, C++ test, Vulkan validation run, or GPU performance capture was run. Hosted Windows was pending; Linux and specialized jobs were skipped. The author-reported test and timing results were read from the PR description and were not independently reproduced. ## To get this to a good state Add the comparable current-main and exact-head performance artifacts described above. I will re-check their commit identities, machine/scene match, and digests, then re-run the same applicable checks on the new head.
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!13667
No description provided.