perf(agc): draw finisher pipeline (APS5_DRAW_PIPELINE) #6946

Merged
Raghav314 merged 9 commits from upstream-pr/6946 into main 2026-10-23 05:24:48 +00:00
Raghav314 commented 2026-10-16 20:49:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-16T20:49:40Z.


What

An opt-in draw path, APS5_DRAW_PIPELINE=1, that takes per-draw work off the queue worker. Meant with APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 (both on main). Based on main a6dcea927; #9508 (descriptor heap) is stacked on it.

  • Draw finisher. The second half of a draw (stage materialization, the draw cache insert, the hand-off to the committer) runs on its own thread while the worker reads the next draw's packets. The worker waits for it before the next cache lookup, before packets that are not register writes or draws, and before guest reads.
  • Commit trims. The committer skips the fragment-output validation and the storage-image layer scans when their inputs match the last commit's.
  • Epoch proofs. A resource or storage image proved current is not proved again in the same collect epoch until a CPU write, a write-back or a recorded write breaks the proof.
  • Ordered metadata passes. Resolve, fast-clear eliminate and DCC decompress go through the pipeline with their write ranges instead of draining it.
  • Shape refresh. A shape entry left at an old draw by main's second-sight admission is replaced in place when the same read user words are seen twice.
  • Labels behind the finisher. WRITE_DATA and RELEASE_MEM labels queued while the finisher holds draws go through its queue instead of draining it, and a WAIT_REG_MEM on them stays beside it.
  • Capture memory. On Linux the main image's pages get a page table entry as on Windows, and capture pages are pooled across threads.

Always on, with the same results: the draw resource key is built in place with a per-result memo, a vertex stage's attribute and buffer table words are read in one read, and the pending storage-image check skips ranges the pending set cannot overlap.

APS5_VERIFY_DRAW_PIPELINE=1 runs the full checks next to the reused proofs and counts differences ([epoch-proofs]). APS5_PROFILE_DRAW=1 finishes every draw on the worker, so it cannot measure this switch.

PPSA36082 (Hades II)

The hub, player standing still, APS5_TRACE_SECONDS=120:10, APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1. Caches warm (each setting run once into the hub, then the title restarted), no other APS5_TRACE_* or APS5_PROFILE_* switch, log not redirected. Current main stops Hades II while the hub loads, so both builds have #6300 merged locally. The switch-on build is the head of #9508, which contains this PR, with the heap switch off.

presents / 10 s frame p50 p99 GPU busy per present queue worker busy
main a6dcea927 + #6300 706 14.0 ms 18.7 ms 2.22 ms 98%
APS5_DRAW_PIPELINE=1 886 11.2 ms 13.7 ms 2.34 ms 96%

+25% frame rate.

Summary lines, traces and digests

main + #6300:

{"commit":"de49f41349a9","dirty":false,"env":{"APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":8859,"ms":10001.243},"presents":706,"frame_ms":{"p50":13.955,"p90":15.665,"p99":18.680,"max":25.064},"gpu_busy_ms_per_present":2.224,"worker_busy_pct":{"queue worker 0x0":97.766},"top_phases_ms_per_frame":{"Driver.Packet":13.844,"Driver.Packet.draw":11.959,"Driver.Draw":11.850,"Driver.Draw.shader_compile_and_link":8.284,"Graphics.Draw":8.166,"Graphics.Draw.draw_and_resource_release":6.859,"Shader.DrawStage":5.206,"Shader.DrawStage.capture_resources":3.196},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.816,"events_lost":132221,"totals_full":false}},"trace":"aps5-trace-de49f41349a9-624652.json.gz"}

APS5_DRAW_PIPELINE=1:

{"commit":"568369d27a2e","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":10851,"ms":10010.638},"presents":886,"frame_ms":{"p50":11.172,"p90":12.083,"p99":13.652,"max":41.180},"gpu_busy_ms_per_present":2.340,"worker_busy_pct":{"queue worker 0x0":96.015},"top_phases_ms_per_frame":{"Driver.Packet":10.838,"Driver.Packet.draw":8.115,"Graphics.Draw":8.087,"Driver.Draw":8.030,"Driver.DrawFinish":7.151,"Graphics.Draw.draw_and_resource_release":6.678,"Driver.Draw.prepare":4.793,"Driver.DrawFinish.shader_compile_and_link":4.199},"trace_dropped":false,"trace":"aps5-trace-568369d27a2e-626697.json.gz"}

Traces:
aps5-trace-de49f41349a9-624652.json.gz
aps5-trace-568369d27a2e-626697.json.gz

seconds 120:10 from present 8859: 706 presents, frame p50 14.0 / p90 15.7 / p99 18.7 / max 25.1 ms, GPU busy 2.2 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.2.10-1-cachyos, 1920x1080, commit de49f41349a9, dropped: yes

{"commit":"de49f41349a9","dirty":false,"env":{"APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":8859,"ms":10001.243},"presents":706,"frame_ms":{"p50":13.955,"p90":15.665,"p99":18.68,"max":25.064},"gpu_busy_ms_per_present":2.224,"worker_busy_pct":{"queue worker 0x0":97.766},"top_phases_ms_per_frame":{"Driver.Packet":13.844,"Driver.Packet.draw":11.959,"Driver.Draw":11.85,"Driver.Draw.shader_compile_and_link":8.284,"Graphics.Draw":8.166,"Graphics.Draw.draw_and_resource_release":6.859,"Shader.DrawStage":5.206,"Shader.DrawStage.capture_resources":3.196},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.816,"events_lost":132221,"totals_full":false}},"trace":"aps5-trace-de49f41349a9-624652.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 9448: 25.1 ms at 8235 ms: Graphics.Draw (draw committer) 8.2, Graphics.Draw.draw_and_resource_release (draw committer) 6.7, batch (gpu) 2.4, Recorder.Sync (draw committer) 0.5
  • present 9447: 21.4 ms at 8214 ms: Graphics.Draw (draw committer) 6.8, Graphics.Draw.draw_and_resource_release (draw committer) 5.3, batch (gpu) 2.2, Recorder.Sync (draw committer) 0.4
  • present 8967: 20.6 ms at 1554 ms: Driver.Packet (queue worker 0x0) 12.8, Driver.Packet.draw (queue worker 0x0) 12.6, Driver.Draw (queue worker 0x0) 12.5, Driver.Draw.shader_compile_and_link (queue worker 0x0) 5.6
  • present 9476: 20.0 ms at 8689 ms: Graphics.Draw (draw committer) 5.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.9, batch (gpu) 2.1, Recorder.Sync (draw committer) 0.4
  • present 9436: 19.6 ms at 8054 ms: Graphics.Draw (draw committer) 5.2, Graphics.Draw.draw_and_resource_release (draw committer) 3.5, batch (gpu) 2.1, Graphics.Draw.validate (draw committer) 0.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 3.6 (26 %) 0.0 (0 %) 10.5 28.8 Driver.Packet 3.6, Driver.Draw.shader_compile_and_link 0.0
draw committer 2.6 (18 %) 0.2 (1 %) 11.4 12.8 Graphics.Draw 2.5, Recorder.Reap 0.0
title 0.0 (0 %) 0.0 (0 %) 14.2 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
presenter 0.3 (2 %) 0.0 (0 %) 13.9 0.1 VideoOut.Flip 0.3, Driver.Present 0.0
gpu 2.2 (16 %) 0.0 (0 %) 11.9 0.0 batch 2.2

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 3.6, Driver.Packet.draw 3.5, Driver.Draw 3.4, Graphics.Draw 2.5, batch 2.2, Graphics.Draw.draw_and_resource_release 1.6, Driver.Draw.shader_compile_and_link 1.4, Recorder.Sync 0.3, VideoOut.Flip 0.3, VideoOut.Flip.present 0.3

Longest waits

  • GpuMutex.wait.fill (draw committer) 0.6 ms at 8989 ms, present 9495
  • GpuMutex.wait.draw (draw committer) 0.6 ms at 5107 ms, present 9226
  • GpuMutex.wait.draw (draw committer) 0.6 ms at 9740 ms, present 9547
  • GpuMutex.wait.draw (draw committer) 0.5 ms at 7700 ms, present 9411
  • GpuMutex.wait.fill (draw committer) 0.5 ms at 2460 ms, present 9032
  • GpuMutex.wait.draw (draw committer) 0.5 ms at 1154 ms, present 8940
  • GpuMutex.wait.draw (draw committer) 0.5 ms at 9985 ms, present 9564
  • GpuMutex.wait.draw (draw committer) 0.5 ms at 8917 ms, present 9490
  • Driver.Present.render_fence_wait (presenter) 0.5 ms at 1099 ms, present 8936
  • GpuMutex.wait.draw (draw committer) 0.5 ms at 5976 ms, present 9289

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 2230: 0.6 ms at 2082 ms, present 9004: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.2
  • batch 8347: 0.5 ms at 7633 ms, present 9406: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.3
  • batch 7720: 0.5 ms at 7050 ms, present 9366: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.1
  • batch 1246: 0.5 ms at 1159 ms, present 8940: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Reap (draw committer) 0.0
  • batch 9168: 0.5 ms at 8421 ms, present 9459: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.3

seconds 120:10 from present 10851: 886 presents, frame p50 11.2 / p90 12.1 / p99 13.7 / max 41.2 ms, GPU busy 2.3 ms per present
NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.2.10-1-cachyos, 1920x1080, commit 568369d27a2e, dropped: no

{"commit":"568369d27a2e","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":10851,"ms":10010.638},"presents":886,"frame_ms":{"p50":11.172,"p90":12.083,"p99":13.652,"max":41.18},"gpu_busy_ms_per_present":2.34,"worker_busy_pct":{"queue worker 0x0":96.015},"top_phases_ms_per_frame":{"Driver.Packet":10.838,"Driver.Packet.draw":8.115,"Graphics.Draw":8.087,"Driver.Draw":8.03,"Driver.DrawFinish":7.151,"Graphics.Draw.draw_and_resource_release":6.678,"Driver.Draw.prepare":4.793,"Driver.DrawFinish.shader_compile_and_link":4.199},"trace_dropped":false,"trace":"aps5-trace-568369d27a2e-626697.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 11411: 41.2 ms at 6239 ms: Driver.Packet (queue worker 0x0) 32.8, Driver.Packet.draw (queue worker 0x0) 31.6, Driver.Draw (queue worker 0x0) 31.6, Driver.Draw.prepare (queue worker 0x0) 30.1
  • present 11229: 16.1 ms at 4198 ms: Driver.Packet (queue worker 0x0) 5.6, Graphics.Draw (draw committer) 4.7, Driver.DrawFinish (draw finisher) 4.6, Driver.Packet.draw (queue worker 0x0) 4.4
  • present 11231: 15.2 ms at 4228 ms: Driver.Packet (queue worker 0x0) 5.0, Graphics.Draw (draw committer) 3.4, Driver.Packet.draw (queue worker 0x0) 3.0, Driver.Draw (queue worker 0x0) 2.9
  • present 11479: 13.8 ms at 7077 ms: Driver.Packet (queue worker 0x0) 4.4, Graphics.Draw (draw committer) 3.8, Driver.Packet.draw (queue worker 0x0) 3.6, Driver.Draw (queue worker 0x0) 3.5
  • present 11407: 13.8 ms at 6190 ms: Driver.Packet (queue worker 0x0) 4.8, Graphics.Draw (draw committer) 3.6, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Driver.Packet.draw (queue worker 0x0) 3.0

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 2.4 (21 %) 0.0 (0 %) 8.9 29.5 Driver.Packet 2.4, Driver.Completion 0.0
draw committer 2.6 (23 %) 0.2 (2 %) 8.4 12.5 Graphics.Draw 2.6, Recorder.Reap 0.0
title 0.0 (0 %) 0.0 (0 %) 11.3 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
draw finisher 1.7 (15 %) 0.0 (0 %) 9.6 17.8 Driver.DrawFinish 1.7
presenter 0.3 (3 %) 0.0 (0 %) 11.0 0.1 VideoOut.Flip 0.3, Driver.Present 0.0
gpu 2.3 (21 %) 0.0 (0 %) 9.0 0.0 batch 2.3

Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 2.6, Driver.Packet 2.4, batch 2.3, Driver.Packet.draw 1.9, Driver.Draw 1.8, Graphics.Draw.draw_and_resource_release 1.8, Driver.DrawFinish 1.7, Driver.DrawFinish.draw_enqueued 1.0, Driver.Draw.prepare 0.9, Driver.Draw.draw_handed_off 0.5

Longest waits

  • Driver.Present.gpu_mutex_wait (presenter) 1.3 ms at 7138 ms, present 11484
  • GpuMutex.wait.draw (draw committer) 0.8 ms at 6553 ms, present 11434
  • GpuMutex.wait.fill (draw committer) 0.8 ms at 4401 ms, present 11246
  • Driver.Present.gpu_mutex_wait (presenter) 0.7 ms at 690 ms, present 10913
  • GpuMutex.wait.fill (draw committer) 0.6 ms at 1700 ms, present 11004
  • GpuMutex.wait.draw (draw committer) 0.6 ms at 1654 ms, present 11000
  • GpuMutex.wait.draw (draw committer) 0.6 ms at 9033 ms, present 11651
  • GpuMutex.wait.fill (draw committer) 0.6 ms at 4685 ms, present 11272
  • GpuMutex.wait.draw (draw committer) 0.6 ms at 1710 ms, present 11005
  • GpuMutex.wait.draw (draw committer) 0.5 ms at 6239 ms, present 11411

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 10494: 0.7 ms at 7733 ms, present 11535: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Recorder.Sync (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 979: 0.7 ms at 716 ms, present 10915: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.3
  • batch 11842: 0.6 ms at 8716 ms, present 11622: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4
  • batch 13211: 0.6 ms at 9717 ms, present 11711: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
  • batch 6893: 0.6 ms at 5013 ms, present 11301: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2

Tested

Linux (CachyOS), x86-64, GCC, 7800X3D / RTX 4090, NVIDIA 615.78.08, on main a6dcea927.

  • The whole ctest (1920) on #9508's head, which contains this PR: all pass except agc_driver_sample_order, agc_driver_sample_order_grid_reference and agc_driver_sample_order_recipe_depth_locations, which fail the same way on main. Conventions pass.
  • 21 existing tests that check results after CPU writes, BDA reads, pipelined DMA and fills, draw cache reuse, labels and a rejected draw also run with the switch (*_draw_pipeline).
  • New tests: agc_driver_pipelined_metadata_pass, agc_driver_program_writes_memory, agc_driver_draw_data_hit_user_words_refresh, agc_driver_draw_finisher_trace, agc_driver_finisher_label_order.
  • Under the Khronos validation layer, tests that drew through the pipeline aborted at exit: the last draw's pipeline items kept the device alive past shutdown, so its cached textures were freed after the layer unloaded. Finished items are now released at shutdown (last commit); agc_driver_address_passes exits cleanly again, as on main.

Known limits

  • Register loads behind held draws whose writes are not known still drain the finisher. Hades II has none; follow-up.
  • Finished pipeline items are freed at the next enqueue (or at shutdown), so up to the pipeline depth of closures stays alive while the queue is quiet.

Why this is one PR

In Hades II the parts on their own made the frame rate worse: the finisher alone made the committer the limit, which the commit trims and epoch proofs fix, and the faster worker dropped data-only stage reuse to 17% until the shape refresh brought it back to 83%.

Testing other titles

Please post:

  • the title ID, GPU, driver and OS;
  • the summary line (APS5_TRACE_SECONDS=70:10, captured as the Performance report form describes) with and without APS5_DRAW_PIPELINE=1, both with APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 and nothing else changed;
  • whether anything renders differently;
  • with APS5_VERIFY_DRAW_PIPELINE=1, the last [epoch-proofs] line (a nonzero "differed" or "failed" count is a bug).

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
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4090, 615.78.08, Linux 7.2.10 (CachyOS)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4894109809 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-16T20:49:40Z. --- ### What An opt-in draw path, `APS5_DRAW_PIPELINE=1`, that takes per-draw work off the queue worker. Meant with `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1` (both on `main`). Based on `main` a6dcea927; #9508 (descriptor heap) is stacked on it. - **Draw finisher.** The second half of a draw (stage materialization, the draw cache insert, the hand-off to the committer) runs on its own thread while the worker reads the next draw's packets. The worker waits for it before the next cache lookup, before packets that are not register writes or draws, and before guest reads. - **Commit trims.** The committer skips the fragment-output validation and the storage-image layer scans when their inputs match the last commit's. - **Epoch proofs.** A resource or storage image proved current is not proved again in the same collect epoch until a CPU write, a write-back or a recorded write breaks the proof. - **Ordered metadata passes.** Resolve, fast-clear eliminate and DCC decompress go through the pipeline with their write ranges instead of draining it. - **Shape refresh.** A shape entry left at an old draw by `main`'s second-sight admission is replaced in place when the same read user words are seen twice. - **Labels behind the finisher.** `WRITE_DATA` and `RELEASE_MEM` labels queued while the finisher holds draws go through its queue instead of draining it, and a `WAIT_REG_MEM` on them stays beside it. - **Capture memory.** On Linux the main image's pages get a page table entry as on Windows, and capture pages are pooled across threads. Always on, with the same results: the draw resource key is built in place with a per-result memo, a vertex stage's attribute and buffer table words are read in one read, and the pending storage-image check skips ranges the pending set cannot overlap. `APS5_VERIFY_DRAW_PIPELINE=1` runs the full checks next to the reused proofs and counts differences (`[epoch-proofs]`). `APS5_PROFILE_DRAW=1` finishes every draw on the worker, so it cannot measure this switch. ### PPSA36082 (Hades II) The hub, player standing still, `APS5_TRACE_SECONDS=120:10`, `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`. Caches warm (each setting run once into the hub, then the title restarted), no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch, log not redirected. Current `main` stops Hades II while the hub loads, so both builds have #6300 merged locally. The switch-on build is the head of #9508, which contains this PR, with the heap switch off. | | presents / 10 s | frame p50 | p99 | GPU busy per present | queue worker busy | |---|---|---|---|---|---| | `main` a6dcea927 + #6300 | 706 | 14.0 ms | 18.7 ms | 2.22 ms | 98% | | `APS5_DRAW_PIPELINE=1` | 886 | 11.2 ms | 13.7 ms | 2.34 ms | 96% | +25% frame rate. <details><summary>Summary lines, traces and digests</summary> `main` + #6300: ```json {"commit":"de49f41349a9","dirty":false,"env":{"APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":8859,"ms":10001.243},"presents":706,"frame_ms":{"p50":13.955,"p90":15.665,"p99":18.680,"max":25.064},"gpu_busy_ms_per_present":2.224,"worker_busy_pct":{"queue worker 0x0":97.766},"top_phases_ms_per_frame":{"Driver.Packet":13.844,"Driver.Packet.draw":11.959,"Driver.Draw":11.850,"Driver.Draw.shader_compile_and_link":8.284,"Graphics.Draw":8.166,"Graphics.Draw.draw_and_resource_release":6.859,"Shader.DrawStage":5.206,"Shader.DrawStage.capture_resources":3.196},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.816,"events_lost":132221,"totals_full":false}},"trace":"aps5-trace-de49f41349a9-624652.json.gz"} ``` `APS5_DRAW_PIPELINE=1`: ```json {"commit":"568369d27a2e","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":10851,"ms":10010.638},"presents":886,"frame_ms":{"p50":11.172,"p90":12.083,"p99":13.652,"max":41.180},"gpu_busy_ms_per_present":2.340,"worker_busy_pct":{"queue worker 0x0":96.015},"top_phases_ms_per_frame":{"Driver.Packet":10.838,"Driver.Packet.draw":8.115,"Graphics.Draw":8.087,"Driver.Draw":8.030,"Driver.DrawFinish":7.151,"Graphics.Draw.draw_and_resource_release":6.678,"Driver.Draw.prepare":4.793,"Driver.DrawFinish.shader_compile_and_link":4.199},"trace_dropped":false,"trace":"aps5-trace-568369d27a2e-626697.json.gz"} ``` Traces: [aps5-trace-de49f41349a9-624652.json.gz](https://github.com/user-attachments/files/33797644/aps5-trace-de49f41349a9-624652.json.gz) [aps5-trace-568369d27a2e-626697.json.gz](https://github.com/user-attachments/files/33797664/aps5-trace-568369d27a2e-626697.json.gz) **seconds 120:10** from present 8859: 706 presents, frame p50 14.0 / p90 15.7 / p99 18.7 / max 25.1 ms, GPU busy 2.2 ms per present NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.2.10-1-cachyos, 1920x1080, commit de49f41349a9, dropped: yes ```json {"commit":"de49f41349a9","dirty":false,"env":{"APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":8859,"ms":10001.243},"presents":706,"frame_ms":{"p50":13.955,"p90":15.665,"p99":18.68,"max":25.064},"gpu_busy_ms_per_present":2.224,"worker_busy_pct":{"queue worker 0x0":97.766},"top_phases_ms_per_frame":{"Driver.Packet":13.844,"Driver.Packet.draw":11.959,"Driver.Draw":11.85,"Driver.Draw.shader_compile_and_link":8.284,"Graphics.Draw":8.166,"Graphics.Draw.draw_and_resource_release":6.859,"Shader.DrawStage":5.206,"Shader.DrawStage.capture_resources":3.196},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.816,"events_lost":132221,"totals_full":false}},"trace":"aps5-trace-de49f41349a9-624652.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 9448: 25.1 ms at 8235 ms: Graphics.Draw (draw committer) 8.2, Graphics.Draw.draw_and_resource_release (draw committer) 6.7, batch (gpu) 2.4, Recorder.Sync (draw committer) 0.5 - present 9447: 21.4 ms at 8214 ms: Graphics.Draw (draw committer) 6.8, Graphics.Draw.draw_and_resource_release (draw committer) 5.3, batch (gpu) 2.2, Recorder.Sync (draw committer) 0.4 - present 8967: 20.6 ms at 1554 ms: Driver.Packet (queue worker 0x0) 12.8, Driver.Packet.draw (queue worker 0x0) 12.6, Driver.Draw (queue worker 0x0) 12.5, Driver.Draw.shader_compile_and_link (queue worker 0x0) 5.6 - present 9476: 20.0 ms at 8689 ms: Graphics.Draw (draw committer) 5.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.9, batch (gpu) 2.1, Recorder.Sync (draw committer) 0.4 - present 9436: 19.6 ms at 8054 ms: Graphics.Draw (draw committer) 5.2, Graphics.Draw.draw_and_resource_release (draw committer) 3.5, batch (gpu) 2.1, Graphics.Draw.validate (draw committer) 0.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 3.6 (26 %) | 0.0 (0 %) | 10.5 | 28.8 | Driver.Packet 3.6, Driver.Draw.shader_compile_and_link 0.0 | | draw committer | 2.6 (18 %) | 0.2 (1 %) | 11.4 | 12.8 | Graphics.Draw 2.5, Recorder.Reap 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 14.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | presenter | 0.3 (2 %) | 0.0 (0 %) | 13.9 | 0.1 | VideoOut.Flip 0.3, Driver.Present 0.0 | | gpu | 2.2 (16 %) | 0.0 (0 %) | 11.9 | 0.0 | batch 2.2 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 3.6, Driver.Packet.draw 3.5, Driver.Draw 3.4, Graphics.Draw 2.5, batch 2.2, Graphics.Draw.draw_and_resource_release 1.6, Driver.Draw.shader_compile_and_link 1.4, Recorder.Sync 0.3, VideoOut.Flip 0.3, VideoOut.Flip.present 0.3 **Longest waits** - GpuMutex.wait.fill (draw committer) 0.6 ms at 8989 ms, present 9495 - GpuMutex.wait.draw (draw committer) 0.6 ms at 5107 ms, present 9226 - GpuMutex.wait.draw (draw committer) 0.6 ms at 9740 ms, present 9547 - GpuMutex.wait.draw (draw committer) 0.5 ms at 7700 ms, present 9411 - GpuMutex.wait.fill (draw committer) 0.5 ms at 2460 ms, present 9032 - GpuMutex.wait.draw (draw committer) 0.5 ms at 1154 ms, present 8940 - GpuMutex.wait.draw (draw committer) 0.5 ms at 9985 ms, present 9564 - GpuMutex.wait.draw (draw committer) 0.5 ms at 8917 ms, present 9490 - Driver.Present.render_fence_wait (presenter) 0.5 ms at 1099 ms, present 8936 - GpuMutex.wait.draw (draw committer) 0.5 ms at 5976 ms, present 9289 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2230: 0.6 ms at 2082 ms, present 9004: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.2 - batch 8347: 0.5 ms at 7633 ms, present 9406: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.3 - batch 7720: 0.5 ms at 7050 ms, present 9366: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.1 - batch 1246: 0.5 ms at 1159 ms, present 8940: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Reap (draw committer) 0.0 - batch 9168: 0.5 ms at 8421 ms, present 9459: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.3 **seconds 120:10** from present 10851: 886 presents, frame p50 11.2 / p90 12.1 / p99 13.7 / max 41.2 ms, GPU busy 2.3 ms per present NVIDIA GeForce RTX 4090, NVIDIA 615.78.08, Linux 7.2.10-1-cachyos, 1920x1080, commit 568369d27a2e, dropped: no ```json {"commit":"568369d27a2e","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:10"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 615.78.08","os":"Linux 7.2.10-1-cachyos","cpu":"AMD Ryzen 7 7800X3D 8-Core Processor","cpu_threads":16,"memory_mib":31743,"title_id":"PPSA36082","title":"Hades II","content_version":"01.006.000","resolution":"1920x1080","window":{"spec":"seconds 120:10","first_present":10851,"ms":10010.638},"presents":886,"frame_ms":{"p50":11.172,"p90":12.083,"p99":13.652,"max":41.18},"gpu_busy_ms_per_present":2.34,"worker_busy_pct":{"queue worker 0x0":96.015},"top_phases_ms_per_frame":{"Driver.Packet":10.838,"Driver.Packet.draw":8.115,"Graphics.Draw":8.087,"Driver.Draw":8.03,"Driver.DrawFinish":7.151,"Graphics.Draw.draw_and_resource_release":6.678,"Driver.Draw.prepare":4.793,"Driver.DrawFinish.shader_compile_and_link":4.199},"trace_dropped":false,"trace":"aps5-trace-568369d27a2e-626697.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 11411: 41.2 ms at 6239 ms: Driver.Packet (queue worker 0x0) 32.8, Driver.Packet.draw (queue worker 0x0) 31.6, Driver.Draw (queue worker 0x0) 31.6, Driver.Draw.prepare (queue worker 0x0) 30.1 - present 11229: 16.1 ms at 4198 ms: Driver.Packet (queue worker 0x0) 5.6, Graphics.Draw (draw committer) 4.7, Driver.DrawFinish (draw finisher) 4.6, Driver.Packet.draw (queue worker 0x0) 4.4 - present 11231: 15.2 ms at 4228 ms: Driver.Packet (queue worker 0x0) 5.0, Graphics.Draw (draw committer) 3.4, Driver.Packet.draw (queue worker 0x0) 3.0, Driver.Draw (queue worker 0x0) 2.9 - present 11479: 13.8 ms at 7077 ms: Driver.Packet (queue worker 0x0) 4.4, Graphics.Draw (draw committer) 3.8, Driver.Packet.draw (queue worker 0x0) 3.6, Driver.Draw (queue worker 0x0) 3.5 - present 11407: 13.8 ms at 6190 ms: Driver.Packet (queue worker 0x0) 4.8, Graphics.Draw (draw committer) 3.6, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Driver.Packet.draw (queue worker 0x0) 3.0 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 2.4 (21 %) | 0.0 (0 %) | 8.9 | 29.5 | Driver.Packet 2.4, Driver.Completion 0.0 | | draw committer | 2.6 (23 %) | 0.2 (2 %) | 8.4 | 12.5 | Graphics.Draw 2.6, Recorder.Reap 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 11.3 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | draw finisher | 1.7 (15 %) | 0.0 (0 %) | 9.6 | 17.8 | Driver.DrawFinish 1.7 | | presenter | 0.3 (3 %) | 0.0 (0 %) | 11.0 | 0.1 | VideoOut.Flip 0.3, Driver.Present 0.0 | | gpu | 2.3 (21 %) | 0.0 (0 %) | 9.0 | 0.0 | batch 2.3 | **Largest slices** (ms per frame, inclusive, all threads): Graphics.Draw 2.6, Driver.Packet 2.4, batch 2.3, Driver.Packet.draw 1.9, Driver.Draw 1.8, Graphics.Draw.draw_and_resource_release 1.8, Driver.DrawFinish 1.7, Driver.DrawFinish.draw_enqueued 1.0, Driver.Draw.prepare 0.9, Driver.Draw.draw_handed_off 0.5 **Longest waits** - Driver.Present.gpu_mutex_wait (presenter) 1.3 ms at 7138 ms, present 11484 - GpuMutex.wait.draw (draw committer) 0.8 ms at 6553 ms, present 11434 - GpuMutex.wait.fill (draw committer) 0.8 ms at 4401 ms, present 11246 - Driver.Present.gpu_mutex_wait (presenter) 0.7 ms at 690 ms, present 10913 - GpuMutex.wait.fill (draw committer) 0.6 ms at 1700 ms, present 11004 - GpuMutex.wait.draw (draw committer) 0.6 ms at 1654 ms, present 11000 - GpuMutex.wait.draw (draw committer) 0.6 ms at 9033 ms, present 11651 - GpuMutex.wait.fill (draw committer) 0.6 ms at 4685 ms, present 11272 - GpuMutex.wait.draw (draw committer) 0.6 ms at 1710 ms, present 11005 - GpuMutex.wait.draw (draw committer) 0.5 ms at 6239 ms, present 11411 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 10494: 0.7 ms at 7733 ms, present 11535: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Recorder.Sync (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4 - batch 979: 0.7 ms at 716 ms, present 10915: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.3 - batch 11842: 0.6 ms at 8716 ms, present 11622: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4 - batch 13211: 0.6 ms at 9717 ms, present 11711: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0 - batch 6893: 0.6 ms at 5013 ms, present 11301: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.2 </details> ### Tested Linux (CachyOS), x86-64, GCC, 7800X3D / RTX 4090, NVIDIA 615.78.08, on `main` a6dcea927. - The whole ctest (1920) on #9508's head, which contains this PR: all pass except `agc_driver_sample_order`, `agc_driver_sample_order_grid_reference` and `agc_driver_sample_order_recipe_depth_locations`, which fail the same way on `main`. Conventions pass. - 21 existing tests that check results after CPU writes, BDA reads, pipelined DMA and fills, draw cache reuse, labels and a rejected draw also run with the switch (`*_draw_pipeline`). - New tests: `agc_driver_pipelined_metadata_pass`, `agc_driver_program_writes_memory`, `agc_driver_draw_data_hit_user_words_refresh`, `agc_driver_draw_finisher_trace`, `agc_driver_finisher_label_order`. - Under the Khronos validation layer, tests that drew through the pipeline aborted at exit: the last draw's pipeline items kept the device alive past shutdown, so its cached textures were freed after the layer unloaded. Finished items are now released at shutdown (last commit); `agc_driver_address_passes` exits cleanly again, as on `main`. ### Known limits - Register loads behind held draws whose writes are not known still drain the finisher. Hades II has none; follow-up. - Finished pipeline items are freed at the next enqueue (or at shutdown), so up to the pipeline depth of closures stays alive while the queue is quiet. ### Why this is one PR In Hades II the parts on their own made the frame rate worse: the finisher alone made the committer the limit, which the commit trims and epoch proofs fix, and the faster worker dropped data-only stage reuse to 17% until the shape refresh brought it back to 83%. ### Testing other titles Please post: - the title ID, GPU, driver and OS; - the summary line (`APS5_TRACE_SECONDS=70:10`, captured as the [Performance report](https://github.com/boykopovar/AnyPS5/blob/main/.github/ISSUE_TEMPLATE/performance.yml) form describes) with and without `APS5_DRAW_PIPELINE=1`, both with `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1` and nothing else changed; - whether anything renders differently; - with `APS5_VERIFY_DRAW_PIPELINE=1`, the last `[epoch-proofs]` line (a nonzero "differed" or "failed" count is a bug). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](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] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4090, 615.78.08, Linux 7.2.10 (CachyOS) - [x] AI-assisted: yes
TideOPL commented 2026-10-16 21:56:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-16T21:56:45Z.


Tested on Minecraft Dungeons II (PPSA16064, UE).

Setup

  • Windows 11 (26200), NVIDIA GeForce RTX 5070 (driver 610.88), WinLibs GCC 15.2, Release.
  • Build: main bc3c0fc13 + #6947's head ddb3938e0, which carries #5656, #6632 and this PR, plus #5372. #5372 keeps this title out of a slow mode where one buffer is copied on every draw, so the runs are comparable.
  • Every run used APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_TRACE_SECONDS=70:10 APS5_TRACE_EVENTS=1048576.
  • The trace window starts 70 s after the gameplay HUD appears (a local trigger file), at the same standing spot in Squid Coast.
  • Each configuration had a warm-up boot, then two runs.
config p50 / p90 / p99 ms presents in 10 s GPU busy ms per present
base (no new switches) 97.0 / 102.4 / 110.9 · 93.0 / 98.1 / 117.3 103 · 107 41.5 · 44.1
APS5_DRAW_PIPELINE=1 98.1 / 103.9 / 114.3 · 99.7 / 106.3 / 123.1 102 · 100 44.8 · 45.7
APS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1 110.1 / 115.7 / 131.5 · 122.9 / 133.7 / 146.5 91 · 81 44.6 · 60.5

Draw pipeline. It doesn't speed up this title.

  • Queue worker 0 drops from 99.1% to about 96% busy.
  • The frame stays at about 98 ms. Here, queue 0 also waits about 53 ms per frame in memory_wait for the compute queue (worker 0x20, 99.5% busy), and that isn't on the path this PR moves.

Rendering. Nothing renders wrong in either mode. We took screenshots every 3 s over 90 s of gameplay in each run: no missing textures, no flicker, and no red artefacts. Frames match the base build.

First boot with an empty shader cache. With APS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1 and ANYPS5_SHADER_CACHE_DIR set to a new, empty directory, the first boot reached gameplay on the first try: title at 23 s, gameplay at 90 s, 919 misses in the first 10 s.

Unrelated failure in the base mode. The base mode (APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 without the new switches) aborted twice during gameplay with compute shader 0x16000c4400: AGC graphics: storing storage image results pending over mem…, then completed on the third boot. Neither new mode hit it in these runs.

Heap verify lines are in #6947.

Summary lines (second run of each)
{"commit":"14697483367c","dirty":false,"env":{"APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_STAGING_POOL_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"70:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 610.88","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":2469,"ms":10039.361},"presents":107,"frame_ms":{"p50":93.045,"p90":98.051,"p99":117.339,"max":118.137},"gpu_busy_ms_per_present":44.053,"worker_busy_pct":{"queue worker 0x0":99.116,"queue worker 0x20":99.551},"top_phases_ms_per_frame":{"Driver.Packet":186.280,"Driver.Packet.memory_wait":53.009,"Driver.Packet.dispatch":48.448,"Driver.Dispatch":48.189,"Driver.Packet.draw":38.371,"Driver.Draw":38.263,"Driver.Packet.device_lock":27.892,"Vulkan.Dispatch":23.804},"trace_dropped":false}
{"commit":"14697483367c","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_STAGING_POOL_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"70:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 610.88","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":2387,"ms":10090.606},"presents":100,"frame_ms":{"p50":99.654,"p90":106.292,"p99":123.087,"max":123.087},"gpu_busy_ms_per_present":45.665,"worker_busy_pct":{"queue worker 0x0":95.920,"queue worker 0x20":99.521},"top_phases_ms_per_frame":{"Driver.Packet":197.090,"Driver.Packet.memory_wait":53.561,"Driver.Packet.dispatch":53.051,"Driver.Dispatch":52.768,"Driver.Packet.draw":41.396,"Driver.Draw":41.277,"Driver.Packet.device_lock":27.177,"Vulkan.Dispatch":23.692},"trace_dropped":false}
{"commit":"14697483367c","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_GPU_HEAP":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_STAGING_POOL_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"70:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 610.88","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":1156,"ms":10113.969},"presents":81,"frame_ms":{"p50":122.860,"p90":133.686,"p99":146.471,"max":146.471},"gpu_busy_ms_per_present":60.490,"worker_busy_pct":{"queue worker 0x0":96.705,"queue worker 0x20":99.552},"top_phases_ms_per_frame":{"Driver.Packet":244.925,"Driver.Packet.dispatch":66.312,"Driver.Dispatch":66.010,"Driver.Packet.memory_wait":62.871,"Driver.Packet.draw":53.253,"Driver.Draw":53.128,"Driver.Packet.device_lock":37.632,"Vulkan.Dispatch":34.611},"trace_dropped":false}
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6225457058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6225457058). Originally posted by [TideOPL](https://github.com/TideOPL) on 2026-10-16T21:56:45Z. --- Tested on Minecraft Dungeons II (PPSA16064, UE). **Setup** - Windows 11 (26200), NVIDIA GeForce RTX 5070 (driver 610.88), WinLibs GCC 15.2, Release. - Build: `main` bc3c0fc13 + #6947's head ddb3938e0, which carries #5656, #6632 and this PR, plus #5372. #5372 keeps this title out of a slow mode where one buffer is copied on every draw, so the runs are comparable. - Every run used `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_TRACE_SECONDS=70:10 APS5_TRACE_EVENTS=1048576`. - The trace window starts 70 s after the gameplay HUD appears (a local trigger file), at the same standing spot in Squid Coast. - Each configuration had a warm-up boot, then two runs. | config | p50 / p90 / p99 ms | presents in 10 s | GPU busy ms per present | |---|---|---|---| | base (no new switches) | 97.0 / 102.4 / 110.9 · 93.0 / 98.1 / 117.3 | 103 · 107 | 41.5 · 44.1 | | `APS5_DRAW_PIPELINE=1` | 98.1 / 103.9 / 114.3 · 99.7 / 106.3 / 123.1 | 102 · 100 | 44.8 · 45.7 | | `APS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1` | 110.1 / 115.7 / 131.5 · 122.9 / 133.7 / 146.5 | 91 · 81 | 44.6 · 60.5 | **Draw pipeline.** It doesn't speed up this title. - Queue worker 0 drops from 99.1% to about 96% busy. - The frame stays at about 98 ms. Here, queue 0 also waits about 53 ms per frame in `memory_wait` for the compute queue (worker 0x20, 99.5% busy), and that isn't on the path this PR moves. **Rendering.** Nothing renders wrong in either mode. We took screenshots every 3 s over 90 s of gameplay in each run: no missing textures, no flicker, and no red artefacts. Frames match the base build. **First boot with an empty shader cache.** With `APS5_DRAW_PIPELINE=1 APS5_GPU_HEAP=1` and `ANYPS5_SHADER_CACHE_DIR` set to a new, empty directory, the first boot reached gameplay on the first try: title at 23 s, gameplay at 90 s, 919 misses in the first 10 s. **Unrelated failure in the base mode.** The base mode (`APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1` without the new switches) aborted twice during gameplay with `compute shader 0x16000c4400: AGC graphics: storing storage image results pending over mem…`, then completed on the third boot. Neither new mode hit it in these runs. Heap verify lines are in #6947. <details><summary>Summary lines (second run of each)</summary> ``` {"commit":"14697483367c","dirty":false,"env":{"APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_STAGING_POOL_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"70:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 610.88","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":2469,"ms":10039.361},"presents":107,"frame_ms":{"p50":93.045,"p90":98.051,"p99":117.339,"max":118.137},"gpu_busy_ms_per_present":44.053,"worker_busy_pct":{"queue worker 0x0":99.116,"queue worker 0x20":99.551},"top_phases_ms_per_frame":{"Driver.Packet":186.280,"Driver.Packet.memory_wait":53.009,"Driver.Packet.dispatch":48.448,"Driver.Dispatch":48.189,"Driver.Packet.draw":38.371,"Driver.Draw":38.263,"Driver.Packet.device_lock":27.892,"Vulkan.Dispatch":23.804},"trace_dropped":false} {"commit":"14697483367c","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_STAGING_POOL_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"70:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 610.88","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":2387,"ms":10090.606},"presents":100,"frame_ms":{"p50":99.654,"p90":106.292,"p99":123.087,"max":123.087},"gpu_busy_ms_per_present":45.665,"worker_busy_pct":{"queue worker 0x0":95.920,"queue worker 0x20":99.521},"top_phases_ms_per_frame":{"Driver.Packet":197.090,"Driver.Packet.memory_wait":53.561,"Driver.Packet.dispatch":53.051,"Driver.Dispatch":52.768,"Driver.Packet.draw":41.396,"Driver.Draw":41.277,"Driver.Packet.device_lock":27.177,"Vulkan.Dispatch":23.692},"trace_dropped":false} {"commit":"14697483367c","dirty":false,"env":{"APS5_DRAW_PIPELINE":"1","APS5_GPU_HEAP":"1","APS5_PIPELINED_DRAWS":"32","APS5_PIPELINE_DISPATCH":"1","APS5_STAGING_POOL_MIB":"1024","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"70:10"},"gpu":"NVIDIA GeForce RTX 5070","driver":"NVIDIA 610.88","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 70:10","first_present":1156,"ms":10113.969},"presents":81,"frame_ms":{"p50":122.860,"p90":133.686,"p99":146.471,"max":146.471},"gpu_busy_ms_per_present":60.490,"worker_busy_pct":{"queue worker 0x0":96.705,"queue worker 0x20":99.552},"top_phases_ms_per_frame":{"Driver.Packet":244.925,"Driver.Packet.dispatch":66.312,"Driver.Dispatch":66.010,"Driver.Packet.memory_wait":62.871,"Driver.Packet.draw":53.253,"Driver.Draw":53.128,"Driver.Packet.device_lock":37.632,"Vulkan.Dispatch":34.611},"trace_dropped":false} ``` </details>
CnRJay commented 2026-10-16 21:58:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-16T21:58:35Z.

Review: COMMENTED


Measurements are there and the numbers are good (469 to 807 presents in 10 s, p50 21.1 to 12.2 ms, p99 also lower). Three things before this can be judged.

  • One run each, standing still in a menu, on a 4090 at 1080p. The A/A spread of this setup is not shown (compare #5353, where two identical captures differed by 6.4%), and a menu is the best case for draw-cache reuse. Please add a second pair in gameplay, and repeat the pair once to show the spread.
  • This is one switch over seven unrelated changes (finisher thread, commit trims, epoch proofs, ordered metadata passes, shape refresh, straight-line walk, capture memory). The description says the finisher alone made the frame rate worse (105 fps on, 111 off) and that "only the combination" helps. That is a reason to measure each part against its predecessor and land them in order, not to bundle them: nobody can tell which part carries the gain or the risk. At minimum, split off the parts the finisher does not need (metadata passes, straight-line walk, capture memory).
  • Known limit: agc_driver_draw_cache_relocation fails with the switch on. A path that breaks an existing test should not become a default. Make the walk fall back to the relocatable capture when the cache has relocation enabled, or document which titles need relocation.

It is also stacked on #5656 and #6632, so the diff shown here includes their commits. Rebase after they land so only this PR's two commits remain.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5554156849 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#pullrequestreview-5554156849). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-16T21:58:35Z. **Review:** COMMENTED --- Measurements are there and the numbers are good (469 to 807 presents in 10 s, p50 21.1 to 12.2 ms, p99 also lower). Three things before this can be judged. - One run each, standing still in a menu, on a 4090 at 1080p. The A/A spread of this setup is not shown (compare #5353, where two identical captures differed by 6.4%), and a menu is the best case for draw-cache reuse. Please add a second pair in gameplay, and repeat the pair once to show the spread. - This is one switch over seven unrelated changes (finisher thread, commit trims, epoch proofs, ordered metadata passes, shape refresh, straight-line walk, capture memory). The description says the finisher alone made the frame rate worse (105 fps on, 111 off) and that "only the combination" helps. That is a reason to measure each part against its predecessor and land them in order, not to bundle them: nobody can tell which part carries the gain or the risk. At minimum, split off the parts the finisher does not need (metadata passes, straight-line walk, capture memory). - Known limit: `agc_driver_draw_cache_relocation` fails with the switch on. A path that breaks an existing test should not become a default. Make the walk fall back to the relocatable capture when the cache has relocation enabled, or document which titles need relocation. It is also stacked on #5656 and #6632, so the diff shown here includes their commits. Rebase after they land so only this PR's two commits remain.
Raghav314 commented 2026-10-16 22:39:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-16T22:39:36Z.


@CnRJay thanks for the review.

"Menu". That was a poor word on my side. The scene is not the main menu: it is the item pickup UI in a level, which is the heaviest scene I found in Hades II. The hub holds a steady 120 fps and normal gameplay runs at 100 to 120 fps, so the pickup screen is where the worker is the limit and where the difference shows.

A gameplay trace with both switches (combat in a room, 15 s window, same machine, display at 120 Hz):

presents 1799 in 15 s, frame p50 8.342 / p90 8.344 / p99 8.348 / max 8.397 ms, gpu_busy_ms_per_present 2.216, queue worker 0x0 92.9%, VideoOut.Flip.vblank_wait 8.124 ms per frame

So in combat it sits at the vblank; there is no headroom left to show a difference there on this machine. I have not yet repeated the pair to show the spread.

Splitting. The parts depend on each other in Hades II:

  • The finisher alone halved the worker's busy time (96% to 46%), but the committer then became the limit and the frame rate went down (hub 105 fps on, 111 off). The commit trims and the epoch proofs are what let the committer keep up, and they only matter once the worker feeds it faster.
  • With the faster worker, main's second-sight admission left shape entries at old draws, and data-only reuse of vertex stages fell from about 80% to 17%. The shape refresh brings it back to 83% (hub 108 to 117 fps).
  • The metadata passes go through the pipeline because otherwise every resolve or fast-clear eliminate drains it, so the finisher would wait at each one.
  • The straight-line walk and the capture memory changes are on the capture path. They are the smallest parts; I kept them under the same switch so testers have one path, and APS5_VERIFY_DRAW_PIPELINE=1 checks the walk against the IR evaluator.

So each part could be measured against its predecessor, but the first ones would land as regressions. That is why it is one switch.

I will rebase so only the two commits remain once #5656 and #6632 land.

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6226034462 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6226034462). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-16T22:39:36Z. --- @CnRJay thanks for the review. **"Menu".** That was a poor word on my side. The scene is not the main menu: it is the item pickup UI in a level, which is the heaviest scene I found in Hades II. The hub holds a steady 120 fps and normal gameplay runs at 100 to 120 fps, so the pickup screen is where the worker is the limit and where the difference shows. A gameplay trace with both switches (combat in a room, 15 s window, same machine, display at 120 Hz): ``` presents 1799 in 15 s, frame p50 8.342 / p90 8.344 / p99 8.348 / max 8.397 ms, gpu_busy_ms_per_present 2.216, queue worker 0x0 92.9%, VideoOut.Flip.vblank_wait 8.124 ms per frame ``` So in combat it sits at the vblank; there is no headroom left to show a difference there on this machine. I have not yet repeated the pair to show the spread. **Splitting.** The parts depend on each other in Hades II: - The finisher alone halved the worker's busy time (96% to 46%), but the committer then became the limit and the frame rate went down (hub 105 fps on, 111 off). The commit trims and the epoch proofs are what let the committer keep up, and they only matter once the worker feeds it faster. - With the faster worker, `main`'s second-sight admission left shape entries at old draws, and data-only reuse of vertex stages fell from about 80% to 17%. The shape refresh brings it back to 83% (hub 108 to 117 fps). - The metadata passes go through the pipeline because otherwise every resolve or fast-clear eliminate drains it, so the finisher would wait at each one. - The straight-line walk and the capture memory changes are on the capture path. They are the smallest parts; I kept them under the same switch so testers have one path, and `APS5_VERIFY_DRAW_PIPELINE=1` checks the walk against the IR evaluator. So each part could be measured against its predecessor, but the first ones would land as regressions. That is why it is one switch. I will rebase so only the two commits remain once #5656 and #6632 land. LLM assistance used.
oneandonlydean commented 2026-10-17 00:54:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T00:54:55Z.


@TideOPL's run is the first outside Hades II: on Minecraft Dungeons II at 4K the draw pipeline doesn't help (queue 0 waits about 53 ms per frame on the compute queue) and nothing renders wrong. @CnRJay's asks stand: a gameplay pair with its spread, each part measured against its predecessor so they can land in order, and agc_driver_draw_cache_relocation failing with the switch on. To those we'd add an OFF-vs-main summary pair and a full ctest on the current head, a throw when DrawFinisher::Drain, Settle or the full-queue wait in Enqueue run under the GPU lock, and a failed finisher job reported against its own submission. Keep it a draft; it can't land before #5656.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6227631850 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6227631850). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T00:54:55Z. --- @TideOPL's run is the first outside Hades II: on Minecraft Dungeons II at 4K the draw pipeline doesn't help (queue 0 waits about 53 ms per frame on the compute queue) and nothing renders wrong. @CnRJay's asks stand: a gameplay pair with its spread, each part measured against its predecessor so they can land in order, and `agc_driver_draw_cache_relocation` failing with the switch on. To those we'd add an OFF-vs-main summary pair and a full ctest on the current head, a throw when `DrawFinisher::Drain`, `Settle` or the full-queue wait in `Enqueue` run under the GPU lock, and a failed finisher job reported against its own submission. Keep it a draft; it can't land before #5656.
fma-rc commented 2026-10-17 04:15:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-17T04:15:27Z.

Review: DISMISSED


Linux, RTX 5080 (driver 615.78.08), Ryzen 7 7800X3D. Base is main 2fab88d10 with 5656 and 6632 as in the body, then 6946 at f8192a64b3, all with APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1, warm cache, two 10 s traces each.

frames in 10 s base APS5_DRAW_PIPELINE=1
Astro's Playroom (PPSA01325), first level gameplay 109, 119 138, 135
Hades II (PPSA36082), first area of a new game 640, 646 1122, 1054

Captures match the base in both, and a burst of consecutive Playroom frames shows no glitch. On a Radeon 680M (RADV) Playroom is GPU-bound and the same: 42 base, 43 and 39 with the switch.

One test fails with the switch. In the full ctest (1364 tests) agc_driver_draw_cache_relocation fails 5 of 5 runs with APS5_DRAW_PIPELINE=1 on 6946 and passes 5 of 5 on the base:

with graphics pipeline libraries: the draws that teach the moved pointer and its contents made 0 hits and 1 inserts, expected 0 and 2

Without the switch the suite fails only where the base fails too: agc_driver_store_over_untracked fails 5 of 5 on the base itself, not from this PR. It passes 5 of 5 on current main 0906c64501 with 5656 or 6632 merged alone, so it only shows on the older base.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5556089181 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#pullrequestreview-5556089181). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-17T04:15:27Z. **Review:** DISMISSED --- Linux, RTX 5080 (driver 615.78.08), Ryzen 7 7800X3D. Base is `main` 2fab88d10 with 5656 and 6632 as in the body, then 6946 at f8192a64b3, all with `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`, warm cache, two 10 s traces each. | frames in 10 s | base | `APS5_DRAW_PIPELINE=1` | |---|---|---| | Astro's Playroom (PPSA01325), first level gameplay | 109, 119 | 138, 135 | | Hades II (PPSA36082), first area of a new game | 640, 646 | 1122, 1054 | Captures match the base in both, and a burst of consecutive Playroom frames shows no glitch. On a Radeon 680M (RADV) Playroom is GPU-bound and the same: 42 base, 43 and 39 with the switch. One test fails with the switch. In the full ctest (1364 tests) `agc_driver_draw_cache_relocation` fails 5 of 5 runs with `APS5_DRAW_PIPELINE=1` on 6946 and passes 5 of 5 on the base: `with graphics pipeline libraries: the draws that teach the moved pointer and its contents made 0 hits and 1 inserts, expected 0 and 2` Without the switch the suite fails only where the base fails too: `agc_driver_store_over_untracked` fails 5 of 5 on the base itself, not from this PR. It passes 5 of 5 on current `main` 0906c64501 with 5656 or 6632 merged alone, so it only shows on the older base.
SleglJan commented 2026-10-17 04:22:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-17T04:22:36Z.


007 First Light (PPSA11386 v01.018.000), 4K output, as asked on Discord. The heap runs are on #6947.

Setup:

  • Machine: Linux 7.2.10 (CachyOS), RTX 3080 10 GB, NVIDIA 615.78.08, GCC 16.2.1, Release, bubblewrap sandbox. The title renders at 3840x2160 in a 1500x844 window.
  • Stack: main bc3c0fc13, plus the four open PRs this title needs to boot (#5799, #6317, #6332, #6881), plus #6947's head ddb3938e0 merged in, which brings this PR's f8192a64b and its copies of #5656 and #6632. No other local changes. The title's executable is not patched (no #6172 change). Scripted pad input goes through APS5_PAD_INPUT_FILE, and every run starts from an existing save.
  • Every run: APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1, with the shader cache and pipeline journal copied from a warm-up run with the switches off. The base run hit every cached shader (2,193 hits, 0 misses). With APS5_DRAW_PIPELINE=1, none matched (0 hits, 2,193 misses), and all were translated before the trace window.
  • Window: in the main menu, not 70:10. 70:10 lands on a black loading screen in this title: the menu comes about 19 minutes after start, at ~0.5 FPS even warm. So I used APS5_TRACE_SECONDS=1320:60 with APS5_TRACE_EVENTS=1048576, and the input reaches the menu before the window opens.
run presents frame p50 / p90 ms GPU busy ms per present
base 35 1750.7 / 1817.0 175.4
APS5_DRAW_PIPELINE=1, run 1 32 1877.5 / 1973.1 192.3
APS5_DRAW_PIPELINE=1, run 2 34 1792.2 / 1882.6 181.0
  • Both draw-pipeline runs are slower than the one base run (p50 +41 and +127 ms). They also differ from each other by 85 ms, so with one base sample I can't separate an effect from run-to-run spread.
  • One base sample only: a second base run was killed about a minute in by an unrelated local job. The menu background is animated.
  • The GPU is not the limit in the menu: it is busy ~10% of a frame (175-192 ms per present at 1.75-1.88 s per frame).
    • Queue worker 0 is busy 96-100% of the window. It spends ~1.3 s per frame in draws, most of it capture/prepare: Shader.DrawStage.capture_resources 1,062 ms in the base, Driver.Draw.prepare 1,065-1,089 ms with the draw pipeline. Another 0.34-0.39 s goes to dispatches.
    • The other four workers spend 51-59 s of each ~61-s window in Driver.Packet.memory_wait.
  • Rendering: 13 menu shots per run, 5 s apart, show the same animated menu in both modes, with no missing or wrong textures. The background cycles through scenes, so the shots catch it at different points; it's not a frame-by-frame match, and flicker can't be judged at that spacing.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6229584224 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6229584224). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-17T04:22:36Z. --- 007 First Light (PPSA11386 v01.018.000), 4K output, as asked on Discord. The heap runs are on #6947. Setup: - Machine: Linux 7.2.10 (CachyOS), RTX 3080 10 GB, NVIDIA 615.78.08, GCC 16.2.1, Release, bubblewrap sandbox. The title renders at 3840x2160 in a 1500x844 window. - Stack: `main` bc3c0fc13, plus the four open PRs this title needs to boot (#5799, #6317, #6332, #6881), plus #6947's head ddb3938e0 merged in, which brings this PR's f8192a64b and its copies of #5656 and #6632. No other local changes. The title's executable is not patched (no #6172 change). Scripted pad input goes through `APS5_PAD_INPUT_FILE`, and every run starts from an existing save. - Every run: `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`, with the shader cache and pipeline journal copied from a warm-up run with the switches off. The base run hit every cached shader (2,193 hits, 0 misses). With `APS5_DRAW_PIPELINE=1`, none matched (0 hits, 2,193 misses), and all were translated before the trace window. - Window: in the main menu, not 70:10. 70:10 lands on a black loading screen in this title: the menu comes about 19 minutes after start, at ~0.5 FPS even warm. So I used `APS5_TRACE_SECONDS=1320:60` with `APS5_TRACE_EVENTS=1048576`, and the input reaches the menu before the window opens. | run | presents | frame p50 / p90 ms | GPU busy ms per present | |---|---|---|---| | base | 35 | 1750.7 / 1817.0 | 175.4 | | `APS5_DRAW_PIPELINE=1`, run 1 | 32 | 1877.5 / 1973.1 | 192.3 | | `APS5_DRAW_PIPELINE=1`, run 2 | 34 | 1792.2 / 1882.6 | 181.0 | - Both draw-pipeline runs are slower than the one base run (p50 +41 and +127 ms). They also differ from each other by 85 ms, so with one base sample I can't separate an effect from run-to-run spread. - One base sample only: a second base run was killed about a minute in by an unrelated local job. The menu background is animated. - The GPU is not the limit in the menu: it is busy ~10% of a frame (175-192 ms per present at 1.75-1.88 s per frame). - Queue worker 0 is busy 96-100% of the window. It spends ~1.3 s per frame in draws, most of it capture/prepare: `Shader.DrawStage.capture_resources` 1,062 ms in the base, `Driver.Draw.prepare` 1,065-1,089 ms with the draw pipeline. Another 0.34-0.39 s goes to dispatches. - The other four workers spend 51-59 s of each ~61-s window in `Driver.Packet.memory_wait`. - Rendering: 13 menu shots per run, 5 s apart, show the same animated menu in both modes, with no missing or wrong textures. The background cycles through scenes, so the shots catch it at different points; it's not a frame-by-frame match, and flicker can't be judged at that spacing. AI-assisted: yes (Claude Code)
Raghav314 commented 2026-10-17 07:59:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-17T07:59:03Z.


A repeat on the current head (d63a8044f, with the Windows fix), next to #6949 which prepares draws on a thread pool. Hades II (PPSA36082), the level's item pickup UI, Linux, RTX 4090, 7800X3D, NVIDIA 615.78.08. All three builds are main 2fab88d10 + #5656 + #6632; #6949 is a local cherry-pick of e2d9ac88c onto it. APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_HOST_IMPORT_MIB=6784, warm shader cache, trace 70:10, one run each:

build presents in 10 s frame p50 / p99 ms queue worker 0 busy
base 499 19.9 / 25.3 93%
this PR, APS5_DRAW_PIPELINE=1 824 12.0 / 14.9 84%
#6949, APS5_DRAW_PREP_THREADS=4 501 19.8 / 23.3 93%

The earlier run on the pre-rebase head gave 807 against a base of 469, so the gain repeats (+72% then, +65% now). In this scene #6949's pool keeps no draw in flight (avg 0.0 in flight, the worker waits for it to empty about 13,000 times a second), so it does not add to this path yet; details are on #6949. The two PRs change the same part of Driver::draw, so they conflict.

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231470860 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6231470860). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-17T07:59:03Z. --- A repeat on the current head (d63a8044f, with the Windows fix), next to #6949 which prepares draws on a thread pool. Hades II (PPSA36082), the level's item pickup UI, Linux, RTX 4090, 7800X3D, NVIDIA 615.78.08. All three builds are `main` 2fab88d10 + #5656 + #6632; #6949 is a local cherry-pick of e2d9ac88c onto it. `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_HOST_IMPORT_MIB=6784`, warm shader cache, trace `70:10`, one run each: | build | presents in 10 s | frame p50 / p99 ms | queue worker 0 busy | |---|---|---|---| | base | 499 | 19.9 / 25.3 | 93% | | this PR, `APS5_DRAW_PIPELINE=1` | 824 | 12.0 / 14.9 | 84% | | #6949, `APS5_DRAW_PREP_THREADS=4` | 501 | 19.8 / 23.3 | 93% | The earlier run on the pre-rebase head gave 807 against a base of 469, so the gain repeats (+72% then, +65% now). In this scene #6949's pool keeps no draw in flight (`avg 0.0 in flight`, the worker waits for it to empty about 13,000 times a second), so it does not add to this path yet; details are on #6949. The two PRs change the same part of `Driver::draw`, so they conflict. LLM assistance used.
JAB-dev commented 2026-10-17 08:44:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-17T08:44:13Z.


Besiege (PPSA20313), Windows, RTX 4070 SUPER, Ancient Grounds sandbox (about 1000 draws per frame), head f8192a64b with APS5_DRAW_PIPELINE=1 on top of current main: 17.0 -> 20.0 FPS (three alternating runs each: 17.3/17.2/16.6 before, 20.3/19.8/20.0 after). A 10 minute run in the level on top of other open perf PRs had no errors and the frame looks the same.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231890598 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6231890598). Originally posted by [JAB-dev](https://github.com/JAB-dev) on 2026-10-17T08:44:13Z. --- Besiege (PPSA20313), Windows, RTX 4070 SUPER, Ancient Grounds sandbox (about 1000 draws per frame), head f8192a64b with APS5_DRAW_PIPELINE=1 on top of current main: 17.0 -> 20.0 FPS (three alternating runs each: 17.3/17.2/16.6 before, 20.3/19.8/20.0 after). A 10 minute run in the level on top of other open perf PRs had no errors and the frame looks the same.
blawesom commented 2026-10-17 08:46:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T08:46:50Z.


Rebase handoff — rebased onto current main (all nine commits, authorship unchanged; this PR is the lower half of the #6947 stack, so its commits re-anchor that series too). The conflict in docs/user/USAGE.md keeps your Draw-pipeline section alongside main's newer Texture-cache-budget section.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV):

  • builds; tools/check_conventions.py --base origin/main passes
  • full suite: 1335/1336 — the only failure is the known main regression (agc_driver_tessellation segfault, #4727), not this PR

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/6946
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is c17fe7fa2.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231916163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6231916163). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-17T08:46:50Z. --- **Rebase handoff** — rebased onto current `main` (all nine commits, authorship unchanged; this PR is the lower half of the #6947 stack, so its commits re-anchor that series too). The conflict in `docs/user/USAGE.md` keeps your Draw-pipeline section alongside `main`'s newer Texture-cache-budget section. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): - builds; `tools/check_conventions.py --base origin/main` passes - **full suite: 1335/1336** — the only failure is the known `main` regression (`agc_driver_tessellation` segfault, #4727), not this PR **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/6946 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `c17fe7fa2`.
oneandonlydean commented 2026-10-17 13:49:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T13:49:40Z.


We checked 5e45089b1: only 805774ead46 changed, and it resolves correctly against the committer Stop from #6641.

One low-priority follow-up, affecting APS5_DRAW_PIPELINE=1 at exit only: DrawFinisher isn't drained before Queue0().Stop(), and a ProcessShutdown during a submission skips its drain. A finishDraw job can then run after device.Reset(). Draining the finisher before the queue stops would close it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234666150 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6234666150). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T13:49:40Z. --- We checked 5e45089b1: only 805774ead46 changed, and it resolves correctly against the committer Stop from #6641. One low-priority follow-up, affecting `APS5_DRAW_PIPELINE=1` at exit only: `DrawFinisher` isn't drained before `Queue0().Stop()`, and a `ProcessShutdown` during a submission skips its drain. A `finishDraw` job can then run after `device.Reset()`. Draining the finisher before the queue stops would close it.
EagleBearerYS commented 2026-10-17 14:19:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-17T14:19:10Z.


A macOS build fix for this PR, as a ready commit in case it's useful.

What fails. Apple clang's libc++ has no std::atomic<std::shared_ptr<T>>. The recompiler headers stop at std::atomic's static assertion, "std::atomic requires that 'T' be a trivially copyable type", on this line in ResultKeyMemo:

core/shader/recompiler/Recompiler.hpp:647: mutable std::atomic<std::shared_ptr<const std::vector<std::uint32_t>>> words;

  • Where it shows: the macOS relinker build, which compiles request_serializer_tests.
  • Where it comes from: "perf(recompiler): straight-line SRT walk for resource capture" (f6cfc22bed on the current head, 3f10f0298a before the rebase).
  • Why it hasn't shown here: this PR's checks skip the full builds.

The commit: 8a97b049c4 on exp/pr6946-atomic-memo-5e45089. It is one commit on this PR's current head, 5e45089b19.

  • The memo: ResultKeyMemo::words becomes AtomicSharedPtr<const std::vector<std::uint32_t>>, from prx/libc/include/general/AtomicSharedPtr.hpp.
    • Where the library has std::atomic<std::shared_ptr>, AtomicSharedPtr is that type.
    • Elsewhere it is a locked shared_ptr with the same load and store, so the uses in Draw.cpp don't change.
  • The build files:
    • the header joins shaderCacheKeySources, which the cache key's include check requires;
    • request_serializer_tests gets core/libs on its include path.

Runs on our fork. These use the full Build workflow on Windows and macOS. The fork has no Linux job; libstdc++ takes the std::atomic branch, as Windows' MinGW build does.

  • Red, on this PR's previous head d0779adfa2, which has the same line: run 39036016193.
    • relinker (macos-latest, clang++) fails at the assertion above (job).
    • Every other job passes.
  • Green, the commit on the current head 5e45089b19: run 39038100593.
    • Every job passes.
    • The macOS relinker job runs 178 tests, all passing, request_serializer included (job).
    • Windows runs 1421, all passing.
    • The same change on d0779adfa2 was green too: run 39036312034.

The commit also cherry-picks cleanly onto #6947's head cae12b7d51, so #6947 gets it through the stack. Take it as is, or fix it your own way. If either head moves again, we can redo it there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234994357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6234994357). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-17T14:19:10Z. --- A macOS build fix for this PR, as a ready commit in case it's useful. **What fails.** Apple clang's libc++ has no `std::atomic<std::shared_ptr<T>>`. The recompiler headers stop at `std::atomic`'s static assertion, "std::atomic<T> requires that 'T' be a trivially copyable type", on this line in `ResultKeyMemo`: `core/shader/recompiler/Recompiler.hpp:647`: `mutable std::atomic<std::shared_ptr<const std::vector<std::uint32_t>>> words;` - **Where it shows:** the macOS relinker build, which compiles `request_serializer_tests`. - **Where it comes from:** "perf(recompiler): straight-line SRT walk for resource capture" (f6cfc22bed on the current head, 3f10f0298a before the rebase). - **Why it hasn't shown here:** this PR's checks skip the full builds. **The commit:** [8a97b049c4](https://github.com/EagleBearerYS/AnyPS5/commit/8a97b049c4) on [`exp/pr6946-atomic-memo-5e45089`](https://github.com/EagleBearerYS/AnyPS5/tree/exp/pr6946-atomic-memo-5e45089). It is one commit on this PR's current head, 5e45089b19. - **The memo:** `ResultKeyMemo::words` becomes `AtomicSharedPtr<const std::vector<std::uint32_t>>`, from `prx/libc/include/general/AtomicSharedPtr.hpp`. - Where the library has `std::atomic<std::shared_ptr>`, `AtomicSharedPtr` is that type. - Elsewhere it is a locked `shared_ptr` with the same `load` and `store`, so the uses in `Draw.cpp` don't change. - **The build files:** - the header joins `shaderCacheKeySources`, which the cache key's include check requires; - `request_serializer_tests` gets `core/libs` on its include path. **Runs on our fork.** These use the full Build workflow on Windows and macOS. The fork has no Linux job; libstdc++ takes the `std::atomic` branch, as Windows' MinGW build does. - **Red,** on this PR's previous head d0779adfa2, which has the same line: [run 39036016193](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39036016193). - `relinker (macos-latest, clang++)` fails at the assertion above ([job](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39036016193/job/117405845149)). - Every other job passes. - **Green,** the commit on the current head 5e45089b19: [run 39038100593](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39038100593). - Every job passes. - The macOS relinker job runs 178 tests, all passing, `request_serializer` included ([job](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39038100593/job/117411931740)). - Windows runs 1421, all passing. - The same change on d0779adfa2 was green too: [run 39036312034](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39036312034). The commit also cherry-picks cleanly onto #6947's head cae12b7d51, so #6947 gets it through the stack. Take it as is, or fix it your own way. If either head moves again, we can redo it there.
Raghav314 commented 2026-10-17 14:39:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-17T14:39:27Z.


@oneandonlydean thanks, you're right. The finisher is only drained at the end of a queue 0 submission, so a ProcessShutdown in the middle skipped it. Driver::stop() now drains the finisher after the workers are joined and before Queue0().Stop(), so the committer is still there for any finishDraw that commits, and nothing runs after device.Reset() (19ae93210).

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235197679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6235197679). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-17T14:39:27Z. --- @oneandonlydean thanks, you're right. The finisher is only drained at the end of a queue 0 submission, so a ProcessShutdown in the middle skipped it. `Driver::stop()` now drains the finisher after the workers are joined and before `Queue0().Stop()`, so the committer is still there for any finishDraw that commits, and nothing runs after `device.Reset()` (19ae93210). LLM assistance used.
Raghav314 commented 2026-10-17 14:39:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-17T14:39:28Z.


@EagleBearerYS thanks for this, and for the fork runs. I took 8a97b049c4 as is (now b31be5ae7 after a rebase on main), with you as the author. On Linux it is still std::atomic, so nothing changes there. #6947 has it through the stack.

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235197957 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6235197957). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-17T14:39:28Z. --- @EagleBearerYS thanks for this, and for the fork runs. I took 8a97b049c4 as is (now b31be5ae7 after a rebase on main), with you as the author. On Linux it is still std::atomic, so nothing changes there. #6947 has it through the stack. LLM assistance used.
ps54all commented 2026-10-17 18:20:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-17T18:20:40Z.


Metal Gear Solid 4 (PPSA18194, Master Collection 1.004.003), gameplay after loading a save (Snake idle by the truck), plus two lighter scenes for contrast.

Setup

  • Windows 11, RTX 3080 10 GB (driver 610.74), i9-10850K, WinLibs GCC 15.2, Release.
  • Build: our test branch (main e09dbc2b4 + a few open PRs) merged with main 82f0c9aec, then this PR's 11 commits at b31be5ae7.
  • Both arms: APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_STATS=1; arm B adds APS5_DRAW_PIPELINE=1. 540 s runs, FPS from the window title over the last 150 s of gameplay.
MGS4 gameplay B (APS5_DRAW_PIPELINE=1) A (off)
FPS median (range) 9.1 (8.1-9.5) 7.0-7.5 (5.9-8.1)
[finisher] per 10 s 220.6k handed / 0 on worker 0 / 199.9k
Pipelined commits per 10 s 224.7k 203.8k
Committer us per commit 37.5 41.2
Packet-drain time per 10 s 678 ms 870 ms

About +20-25 % on this scene. One run per arm, but the ranges barely overlap. The picture is identical (same spot, same HUD), no device faults, no failed commits.

Lighter scenes, no change (same build and env, warm runs):

  • Hot Wheels Infinite Rush (PPSA22408), first-run settings page, about 3.8k draws per 10 s: 5.27 vs 5.31 FPS. The finisher took about 45 % of draws; 70 us per commit in both arms.
  • Astro Bot (PPSA21567), title screen, about 31k draws per 10 s: 12.3 vs 12.4 FPS. The finisher took about 99 % of draws; 44-46 us per commit in both arms.

Note on measuring: APS5_PROFILE_DRAW=1 turns the hand-off off (handOff in Driver::draw requires !profile). Our first pair of runs used it and showed 0 handed to the draw finisher. In that pair, with only the reused epoch proofs and the straight-line SRT walk active, the committer cost went from 48.9 to 44.3 us per commit (lookup 1.48 -> 1.20 s, resources 1.00 -> 0.69 s per 10 s), with FPS flat. APS5_PIPELINE_STATS=1 keeps the [finisher] counters without disabling the hand-off. A line in USAGE.md would save others the same detour.

Measured with AI assistance (Claude Code); runs, logs and numbers are from our machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238473321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6238473321). Originally posted by [ps54all](https://github.com/ps54all) on 2026-10-17T18:20:40Z. --- Metal Gear Solid 4 (PPSA18194, Master Collection 1.004.003), gameplay after loading a save (Snake idle by the truck), plus two lighter scenes for contrast. **Setup** - Windows 11, RTX 3080 10 GB (driver 610.74), i9-10850K, WinLibs GCC 15.2, Release. - Build: our test branch (main e09dbc2b4 + a few open PRs) merged with main 82f0c9aec, then this PR's 11 commits at b31be5ae7. - Both arms: `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_STATS=1`; arm B adds `APS5_DRAW_PIPELINE=1`. 540 s runs, FPS from the window title over the last 150 s of gameplay. | MGS4 gameplay | B (`APS5_DRAW_PIPELINE=1`) | A (off) | |---|---|---| | FPS median (range) | 9.1 (8.1-9.5) | 7.0-7.5 (5.9-8.1) | | `[finisher]` per 10 s | 220.6k handed / 0 on worker | 0 / 199.9k | | Pipelined commits per 10 s | 224.7k | 203.8k | | Committer us per commit | 37.5 | 41.2 | | Packet-drain time per 10 s | 678 ms | 870 ms | About +20-25 % on this scene. One run per arm, but the ranges barely overlap. The picture is identical (same spot, same HUD), no device faults, no failed commits. **Lighter scenes, no change** (same build and env, warm runs): - Hot Wheels Infinite Rush (PPSA22408), first-run settings page, about 3.8k draws per 10 s: 5.27 vs 5.31 FPS. The finisher took about 45 % of draws; 70 us per commit in both arms. - Astro Bot (PPSA21567), title screen, about 31k draws per 10 s: 12.3 vs 12.4 FPS. The finisher took about 99 % of draws; 44-46 us per commit in both arms. **Note on measuring:** `APS5_PROFILE_DRAW=1` turns the hand-off off (`handOff` in `Driver::draw` requires `!profile`). Our first pair of runs used it and showed `0 handed to the draw finisher`. In that pair, with only the reused epoch proofs and the straight-line SRT walk active, the committer cost went from 48.9 to 44.3 us per commit (lookup 1.48 -> 1.20 s, resources 1.00 -> 0.69 s per 10 s), with FPS flat. `APS5_PIPELINE_STATS=1` keeps the `[finisher]` counters without disabling the hand-off. A line in USAGE.md would save others the same detour. Measured with AI assistance (Claude Code); runs, logs and numbers are from our machine.
ps54all commented 2026-10-17 18:20:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-17T18:20:42Z.


Two of the new tests do not build with MinGW-w64 (WinLibs GCC 15.2, Windows) at b31be5ae7:

  1. tests/execution/DrawDataHitUserWords.cpp:221

    error: expected unqualified-id before '=' token
      221 |     const auto near = [](unsigned value, unsigned expected) { ... };
    

    near (and far) are empty macros from <windef.h>. Renaming the lambda (we used closeTo) fixes it.

  2. tests/execution/PipelinedMetadataPass.cpp:32

    error: requested alignment '65536' exceeds object file maximum 8192
    

    COFF section alignment stops at 8 KiB, so alignas(65536) on a static std::array is rejected. Allocating the surface at run time, for example with VirtualAlloc on Windows (64 KiB granularity) or std::aligned_alloc elsewhere, avoids it.

Everything else builds. The game libraries are unaffected; only these two test targets fail, which stops a plain cmake --build.

Found with AI assistance (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238473542 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6238473542). Originally posted by [ps54all](https://github.com/ps54all) on 2026-10-17T18:20:42Z. --- Two of the new tests do not build with MinGW-w64 (WinLibs GCC 15.2, Windows) at b31be5ae7: 1. `tests/execution/DrawDataHitUserWords.cpp:221` ``` error: expected unqualified-id before '=' token 221 | const auto near = [](unsigned value, unsigned expected) { ... }; ``` `near` (and `far`) are empty macros from `<windef.h>`. Renaming the lambda (we used `closeTo`) fixes it. 2. `tests/execution/PipelinedMetadataPass.cpp:32` ``` error: requested alignment '65536' exceeds object file maximum 8192 ``` COFF section alignment stops at 8 KiB, so `alignas(65536)` on a static `std::array` is rejected. Allocating the surface at run time, for example with `VirtualAlloc` on Windows (64 KiB granularity) or `std::aligned_alloc` elsewhere, avoids it. Everything else builds. The game libraries are unaffected; only these two test targets fail, which stops a plain `cmake --build`. Found with AI assistance (Claude Code).
fma-rc commented 2026-10-17 18:43:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-17T18:43:15Z.


@Raghav314 the test from my review still fails on b31be5ae7. agc_driver_draw_cache_relocation passes 5 of 5 without the switch and fails 5 of 5 with APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1, on the RTX 5080 (driver 615.78.08) and on a Radeon 680M (RADV), with the same message as before:

AGC graphics: with graphics pipeline libraries: the draws that teach the moved pointer and its contents made 0 hits and 1 inserts, expected 0 and 2

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238808603 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6238808603). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-17T18:43:15Z. --- @Raghav314 the test from my review still fails on b31be5ae7. `agc_driver_draw_cache_relocation` passes 5 of 5 without the switch and fails 5 of 5 with `APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`, on the RTX 5080 (driver 615.78.08) and on a Radeon 680M (RADV), with the same message as before: `AGC graphics: with graphics pipeline libraries: the draws that teach the moved pointer and its contents made 0 hits and 1 inserts, expected 0 and 2`
oneandonlydean commented 2026-10-17 22:19:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T22:19:15Z.


#7184 has merged ("let a draw that only reads through the BDA table continue its render pass"). It adds the read-only rule this PR also carries. Could you rebase onto current main and drop the duplicate read-only rule from this branch? #6947 needs the same change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6242113824 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6242113824). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T22:19:15Z. --- #7184 has merged ("let a draw that only reads through the BDA table continue its render pass"). It adds the read-only rule this PR also carries. Could you rebase onto current main and drop the duplicate read-only rule from this branch? #6947 needs the same change.
ps54all commented 2026-10-18 15:42:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-18T15:42:30Z.


@Raghav314 the two MinGW-w64 test build breaks from my earlier comment are still there at 0f093bec1:

  • tests/execution/DrawDataHitUserWords.cpp:221: near is an empty <windef.h> macro (we renamed the lambda to closeTo).
  • tests/execution/PipelinedMetadataPass.cpp:32: alignas(65536) is over COFF's 8 KiB section limit (a run-time allocation, VirtualAlloc on Windows, avoids it).

The libraries build; only these two test targets fail, which stops a plain cmake --build on Windows.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251827299 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6251827299). Originally posted by [ps54all](https://github.com/ps54all) on 2026-10-18T15:42:30Z. --- @Raghav314 the two MinGW-w64 test build breaks from [my earlier comment](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6238473542) are still there at 0f093bec1: - `tests/execution/DrawDataHitUserWords.cpp:221`: `near` is an empty `<windef.h>` macro (we renamed the lambda to `closeTo`). - `tests/execution/PipelinedMetadataPass.cpp:32`: `alignas(65536)` is over COFF's 8 KiB section limit (a run-time allocation, `VirtualAlloc` on Windows, avoids it). The libraries build; only these two test targets fail, which stops a plain `cmake --build` on Windows. AI-assisted: yes
Raghav314 commented 2026-10-18 16:00:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-18T16:00:49Z.


@fma-rc b31be5a still had the straight-line SRT walk. It records every user word it reads as a value word, so the draws it captures are never relocated, and that is what agc_driver_draw_cache_relocation caught. The rebase dropped that commit (main now replays SRT walks from the #6095 tape). On 0f093be the test passes 5 of 5 here with APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 (RTX 4090, 615.78.08). An older build that still has the walk fails with your message.

@ps54all the two MinGW-w64 breaks are fixed in 6a80154:

  • DrawDataHitUserWords.cpp: the lambda is closeTo now.
  • PipelinedMetadataPass.cpp: the surface and CMASK are views into one 64 KiB-aligned allocation made at run time (VirtualAlloc on Windows, std::aligned_alloc elsewhere) instead of alignas(65536) globals.

I have no MinGW toolchain here, so I could not build the Windows test targets myself.

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252012230 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6252012230). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-18T16:00:49Z. --- @fma-rc b31be5a still had the straight-line SRT walk. It records every user word it reads as a value word, so the draws it captures are never relocated, and that is what `agc_driver_draw_cache_relocation` caught. The rebase dropped that commit (main now replays SRT walks from the #6095 tape). On 0f093be the test passes 5 of 5 here with `APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1` (RTX 4090, 615.78.08). An older build that still has the walk fails with your message. @ps54all the two MinGW-w64 breaks are fixed in 6a80154: - `DrawDataHitUserWords.cpp`: the lambda is `closeTo` now. - `PipelinedMetadataPass.cpp`: the surface and CMASK are views into one 64 KiB-aligned allocation made at run time (`VirtualAlloc` on Windows, `std::aligned_alloc` elsewhere) instead of `alignas(65536)` globals. I have no MinGW toolchain here, so I could not build the Windows test targets myself. LLM assistance used.
fma-rc commented 2026-10-18 18:24:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-18T18:24:02Z.

Review: COMMENTED


@Raghav314 thanks, confirmed. On 6a80154945 agc_driver_draw_cache_relocation passes 5 of 5 on each of RTX 5080 (NVIDIA 615.78), Radeon 680M (RADV, Mesa 26.2) and lavapipe, run with APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1. That was the failure behind my change request, so it is resolved from my side. I did not rerun the MinGW build ps54all mentions.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5564263836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#pullrequestreview-5564263836). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-18T18:24:02Z. **Review:** COMMENTED --- @Raghav314 thanks, confirmed. On 6a80154945 `agc_driver_draw_cache_relocation` passes 5 of 5 on each of RTX 5080 (NVIDIA 615.78), Radeon 680M (RADV, Mesa 26.2) and lavapipe, run with `APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`. That was the failure behind my change request, so it is resolved from my side. I did not rerun the MinGW build ps54all mentions.
teepean commented 2026-10-18 21:43:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by teepean on 2026-10-18T21:43:42Z.


A gameplay pair with its spread, from Stray (PPSA02100, Unreal Engine 4) on Linux. The finisher takes every draw here, but the worker drains it about every second draw, so it only pays when the process stays in one L3 domain.

Setup. CachyOS (kernel 7.2.10), Ryzen 9 9950X (two CCDs: CPUs 0-7/16-23 and 8-15/24-31), RTX 3090 (NVIDIA 615.78.08), GCC 16.2.1 Release, 3840x2160 and stock settings, standing still at the start of Dead City, scx_lavd (lavd 1.1.3, autopilot). The build is main e1338ff5e + this PR at 6a8015494 + #6501. The head is now 599bff4a0, the same change rebased onto a newer main. Without #6501, Stray drains the draw pipeline for an occlusion counter dump about every second draw, which would leave the finisher nothing to overlap. Every arm has APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1. One run at a time, a warm-up per build, then four alternating rounds. Frame times are from APS5_TRACE_SECONDS=185:20 summaries.

"Placement" is a local change that keeps the whole process in one L3 domain (here CCD0). Under EEVDF the kernel does that by itself on this machine; scx_lavd spreads the threads over both CCDs.

Frame p50 / presents in 20 s, mean of four runs (range of presents):

switch off APS5_DRAW_PIPELINE=1
unpinned 161.0 ms / 124.8 (121-130) 167.2 ms / 120.0 (118-123), -4 %
placement 142.9 ms / 138.8 (137-141) 134.0 ms / 148.5 (140-158), +7 %
  • Queue worker 0 goes from 97 % busy to 67-70 %, in both placements.
  • Unpinned, the finisher thread lands on the other CCD: busy-thread samples there go from 20-29 % to 43-54 %. That is the same placement effect I measured for #6632's spin, and it eats the gain.
  • No errors in the 13 starts with the switch on, apart from one that lost the display (SDL "Couldn't find any displays", not this PR). I didn't compare images.

Why the gain is small. With APS5_PIPELINE_STATS=1 (placement, switch on, per 10 s), all 305,000 draws are handed to the finisher. The worker drains it 165,000 times at packets, about every 1.8 draws:

Drained at per 10 s
EVENT_WRITE (0x46), the occlusion counter dumps 75,000
SET_UCONFIG_REG_INDIRECT (0x64) 66,000
SET_CONTEXT_REG_INDIRECT (0x9f) 19,000
DMA_DATA (0x50) 3,200
RELEASE_MEM (0x49) 1,300
  1. The dumps drain because #6501 and this PR don't know about each other. #6501 queues a sample dump as a draw pipeline item, but keepsDrawPipeline still treats it as a drain. So the finisher empties first, and DrawPipeline::Enqueue would drain it anyway for any item the worker queues. I tried sending the dump through the finisher's queue instead, so it is committed after the draws it counts, with the dump range as its pending write (a local switch, not proposed). That only moved the drain: the 0x46 drains went to 0, the RELEASE_MEM after each dump drained the finisher instead (76,000 per 10 s), and the frame rate stayed the same (140.5 ms / 141 presents in three runs, against 137.8 / 144 in two; a third run fell into Stray's ~1 FPS mode). So the labels the worker queues would have to go through the finisher's queue as well, not only the dumps.
  2. The register loads drain on held draws whose writes are unknown. After the drain, 63,000 of the 66,000 0x64 packets and all of the 0x9f packets would have stayed beside the committer. A local counter in PendingOverlaps found 82,000 overlaps per 10 s, all with a held draw marked unknown and none with known writes. Of the held draws, 27 % are "no variant (fragment)" in heldWrites and the rest "targets only". Bounding the writes of a draw whose fragment variant isn't chosen yet would let these packets pass.

Two small things I hit:

  • APS5_PROFILE_DRAW turns the hand-off off (!profile in the handOff condition in Draw.cpp). A profiled A/B of the switch then measures only the always-on parts: my profiled pair handed 0 draws. APS5_PIPELINE_STATS=1 keeps it on.
  • The [finisher-held] reasons are printed only under APS5_PROFILE_DRAW (noteHeld), so with the hand-off off they never print.

AI-assisted: yes (analysis and text with Claude Code; the runs are from my machine).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6255512105 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6255512105). Originally posted by [teepean](https://github.com/teepean) on 2026-10-18T21:43:42Z. --- A gameplay pair with its spread, from Stray (PPSA02100, Unreal Engine 4) on Linux. The finisher takes every draw here, but the worker drains it about every second draw, so it only pays when the process stays in one L3 domain. **Setup.** CachyOS (kernel 7.2.10), Ryzen 9 9950X (two CCDs: CPUs 0-7/16-23 and 8-15/24-31), RTX 3090 (NVIDIA 615.78.08), GCC 16.2.1 Release, 3840x2160 and stock settings, standing still at the start of Dead City, scx_lavd (lavd 1.1.3, autopilot). The build is `main` e1338ff5e + this PR at 6a8015494 + #6501. The head is now 599bff4a0, the same change rebased onto a newer `main`. Without #6501, Stray drains the draw pipeline for an occlusion counter dump about every second draw, which would leave the finisher nothing to overlap. Every arm has `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1`. One run at a time, a warm-up per build, then four alternating rounds. Frame times are from `APS5_TRACE_SECONDS=185:20` summaries. "Placement" is a local change that keeps the whole process in one L3 domain (here CCD0). Under EEVDF the kernel does that by itself on this machine; scx_lavd spreads the threads over both CCDs. Frame p50 / presents in 20 s, mean of four runs (range of presents): | | switch off | `APS5_DRAW_PIPELINE=1` | |---|---|---| | unpinned | 161.0 ms / 124.8 (121-130) | 167.2 ms / 120.0 (118-123), -4 % | | placement | 142.9 ms / 138.8 (137-141) | 134.0 ms / 148.5 (140-158), +7 % | - Queue worker 0 goes from 97 % busy to 67-70 %, in both placements. - Unpinned, the finisher thread lands on the other CCD: busy-thread samples there go from 20-29 % to 43-54 %. That is the same placement effect I measured for #6632's spin, and it eats the gain. - No errors in the 13 starts with the switch on, apart from one that lost the display (SDL "Couldn't find any displays", not this PR). I didn't compare images. **Why the gain is small.** With `APS5_PIPELINE_STATS=1` (placement, switch on, per 10 s), all 305,000 draws are handed to the finisher. The worker drains it 165,000 times at packets, about every 1.8 draws: | Drained at | per 10 s | |---|---| | `EVENT_WRITE` (0x46), the occlusion counter dumps | 75,000 | | `SET_UCONFIG_REG_INDIRECT` (0x64) | 66,000 | | `SET_CONTEXT_REG_INDIRECT` (0x9f) | 19,000 | | `DMA_DATA` (0x50) | 3,200 | | `RELEASE_MEM` (0x49) | 1,300 | 1. **The dumps drain because #6501 and this PR don't know about each other.** #6501 queues a sample dump as a draw pipeline item, but `keepsDrawPipeline` still treats it as a drain. So the finisher empties first, and `DrawPipeline::Enqueue` would drain it anyway for any item the worker queues. I tried sending the dump through the finisher's queue instead, so it is committed after the draws it counts, with the dump range as its pending write (a local switch, not proposed). That only moved the drain: the 0x46 drains went to 0, the `RELEASE_MEM` after each dump drained the finisher instead (76,000 per 10 s), and the frame rate stayed the same (140.5 ms / 141 presents in three runs, against 137.8 / 144 in two; a third run fell into Stray's ~1 FPS mode). So the labels the worker queues would have to go through the finisher's queue as well, not only the dumps. 2. **The register loads drain on held draws whose writes are unknown.** After the drain, 63,000 of the 66,000 0x64 packets and all of the 0x9f packets would have stayed beside the committer. A local counter in `PendingOverlaps` found 82,000 overlaps per 10 s, all with a held draw marked `unknown` and none with known writes. Of the held draws, 27 % are "no variant (fragment)" in `heldWrites` and the rest "targets only". Bounding the writes of a draw whose fragment variant isn't chosen yet would let these packets pass. **Two small things I hit:** - `APS5_PROFILE_DRAW` turns the hand-off off (`!profile` in the `handOff` condition in `Draw.cpp`). A profiled A/B of the switch then measures only the always-on parts: my profiled pair handed 0 draws. `APS5_PIPELINE_STATS=1` keeps it on. - The `[finisher-held]` reasons are printed only under `APS5_PROFILE_DRAW` (`noteHeld`), so with the hand-off off they never print. AI-assisted: yes (analysis and text with Claude Code; the runs are from my machine).
Scramblrrrr commented 2026-10-19 01:36:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-19T01:36:37Z.


Reviewing 599bff4a for a Windows/NVIDIA 007 cross-test after our current-main baseline finishes. Host: 7800X3D / RTX 5070 Ti 617.42 / 32 GiB. Our public integration is https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-oct18-resume-main (9f9a532b1 on main876bd17af), with shared image-table snapshot/resolution reuse and sparse relocation partitioning already carried. 90 selected native tests pass; current title run is warming the new format38 pipeline cache, so no baseline FPS number yet. Previous same-host moving menu was about1.9 FPS with ~178ms GPU busy per present; compute is a substantial limit too.

GitHub currently reports conflicts against main for this PR and #6947. I will start with the finisher independently rather than mixing both into the baseline. If you already have a newer current-main rebase/WIP, a head would help avoid duplicating that integration work. Will report exact head, flags, official digests, and validation counters for any actual cross-test. AI-assisted: Codex; title data remains local.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6257798585 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6257798585). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-19T01:36:37Z. --- Reviewing 599bff4a for a Windows/NVIDIA 007 cross-test after our current-main baseline finishes. Host: 7800X3D / RTX 5070 Ti 617.42 / 32 GiB. Our public integration is https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-oct18-resume-main (9f9a532b1 on main876bd17af), with shared image-table snapshot/resolution reuse and sparse relocation partitioning already carried. 90 selected native tests pass; current title run is warming the new format38 pipeline cache, so no baseline FPS number yet. Previous same-host moving menu was about1.9 FPS with ~178ms GPU busy per present; compute is a substantial limit too. GitHub currently reports conflicts against main for this PR and #6947. I will start with the finisher independently rather than mixing both into the baseline. If you already have a newer current-main rebase/WIP, a head would help avoid duplicating that integration work. Will report exact head, flags, official digests, and validation counters for any actual cross-test. AI-assisted: Codex; title data remains local.
Scramblrrrr commented 2026-10-19 02:36:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-19T02:36:04Z.


Public Windows/007 integration WIP is up: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-finisher-oct19 at c37dc2640, merging your599bff4a (including #5656fe87a2c) onto our pinned7bdb95886/main324e0e48e stack. Building now; NOT native-tested or runtime-staged yet.

Seven conflict files resolved: owned DrawTail data and new finisher proof APIs retained; newer main fixed-size vertex-input read records and output bitmasks retained; our ProgramMemory/multi-stage indirect patches and QueryPendingSpan/shared-table validation retained; trace binding kept on the committer. The finisher's owned program copy is used for the handoff rather than main6312's conditional local reference.

Thanks to @teepean's note: APS5_PROFILE_DRAW disables handOff. The planned same-binary on/off comparison will leave that unset, use APS5_PIPELINE_STATS=1 with APS5_PIPELINED_DRAWS=32 and APS5_PIPELINE_DISPATCH=1 on both arms, and check nonzero handoff counters. Our7800X3D has one CCD, so the two-CCD placement issue should not apply. GPU profiling/official interval summaries remain available; no measured gain claimed yet.

Separately, new-main native deferral modes exposed a Windows two-logger failure; #7709 makes the flush helper reach the shared driver's logger, and29/29 related native controls pass. That fix is carried here. Our previous integration114/114 controls pass, but this WIP still needs its own tests. Raw title data stays local. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258445147 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6258445147). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-19T02:36:04Z. --- Public Windows/007 integration WIP is up: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-finisher-oct19 at c37dc2640, merging your599bff4a (including #5656fe87a2c) onto our pinned7bdb95886/main324e0e48e stack. Building now; NOT native-tested or runtime-staged yet. Seven conflict files resolved: owned DrawTail data and new finisher proof APIs retained; newer main fixed-size vertex-input read records and output bitmasks retained; our ProgramMemory/multi-stage indirect patches and QueryPendingSpan/shared-table validation retained; trace binding kept on the committer. The finisher's owned program copy is used for the handoff rather than main6312's conditional local reference. Thanks to @teepean's note: APS5_PROFILE_DRAW disables handOff. The planned same-binary on/off comparison will leave that unset, use APS5_PIPELINE_STATS=1 with APS5_PIPELINED_DRAWS=32 and APS5_PIPELINE_DISPATCH=1 on both arms, and check nonzero handoff counters. Our7800X3D has one CCD, so the two-CCD placement issue should not apply. GPU profiling/official interval summaries remain available; no measured gain claimed yet. Separately, new-main native deferral modes exposed a Windows two-logger failure; #7709 makes the flush helper reach the shared driver's logger, and29/29 related native controls pass. That fix is carried here. Our previous integration114/114 controls pass, but this WIP still needs its own tests. Raw title data stays local. AI-assisted: Codex.
Scramblrrrr commented 2026-10-19 02:45:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-19T02:45:05Z.


Windows integration update: public head 6d6021bb0 on codex/first-light-finisher-oct19 (599bff4a merged into our pinned 7bdb/main324 stack).

  • 136/136 selected native checks pass, 68.57 s, including all 17 added draw-pipeline variants.
  • 4/4 extra controls pass, 2.33 s, with APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_VERIFY_DRAW_PIPELINE=1: draw-cache relocation, mesh relocation, user-word output, metadata pass. PROFILE_DRAW unset. No skipped cases.
  • Two Windows fixture fixes were needed on the actual 599bff4a source: DrawDataHitUserWords.cpp still names its lambda near, which Windows headers erase; renamed to closeTo (0ac751e35). Runtime-aligned metadata allocation was already present. The verify/refresh user-word CTest variants also lacked the Windows DLL PATH modification: both failed to launch with 0xc0000135; added them to the existing PATH property list (6d6021bb0). The initial selected run was 134/136; the final complete rerun is green. Neither fix changes production rendering or test assertions.
  • Production libraries rebuilt, conventions passed, integration pushed. Matched 130-library cohort staged with SHA-256 verification; previous tested cohort preserved.

007's same-binary OFF/ON menu comparison is starting now with PROFILE_DRAW unset and pipeline stats/32/dispatch1 on both arms. No title result or FPS gain claimed yet. Raw title data stays local. AI-assisted: Codex.

Test-setting correction before measurement: use APS5_PIPELINE_STATS=0, not 1. The new finisher counters use presence, while VulkanDevice enables expensive executable statistics only for the value 1. The first OFF startup was intentionally stopped before any menu measurement after detecting this overlap. The restarted OFF/ON pair uses 0 on both arms; no production change needed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258541121 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6258541121). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-19T02:45:05Z. --- Windows integration update: public head `6d6021bb0` on `codex/first-light-finisher-oct19` (599bff4a merged into our pinned 7bdb/main324 stack). - **136/136 selected native checks pass, 68.57 s**, including all 17 added draw-pipeline variants. - **4/4 extra controls pass, 2.33 s**, with `APS5_DRAW_PIPELINE=1 APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_VERIFY_DRAW_PIPELINE=1`: draw-cache relocation, mesh relocation, user-word output, metadata pass. PROFILE_DRAW unset. No skipped cases. - Two Windows fixture fixes were needed on the actual 599bff4a source: `DrawDataHitUserWords.cpp` still names its lambda `near`, which Windows headers erase; renamed to `closeTo` (0ac751e35). Runtime-aligned metadata allocation was already present. The verify/refresh user-word CTest variants also lacked the Windows DLL PATH modification: both failed to launch with 0xc0000135; added them to the existing PATH property list (6d6021bb0). The initial selected run was 134/136; the final complete rerun is green. Neither fix changes production rendering or test assertions. - Production libraries rebuilt, conventions passed, integration pushed. Matched 130-library cohort staged with SHA-256 verification; previous tested cohort preserved. 007's same-binary OFF/ON menu comparison is starting now with PROFILE_DRAW unset and pipeline stats/32/dispatch1 on both arms. No title result or FPS gain claimed yet. Raw title data stays local. AI-assisted: Codex. Test-setting correction before measurement: use APS5_PIPELINE_STATS=0, not 1. The new finisher counters use presence, while VulkanDevice enables expensive executable statistics only for the value 1. The first OFF startup was intentionally stopped before any menu measurement after detecting this overlap. The restarted OFF/ON pair uses 0 on both arms; no production change needed.
Scramblrrrr commented 2026-10-19 03:07:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-19T03:07:14Z.


007 Windows cross-test finished: no clear finisher benefit in this menu.

Same binary and SHA-256-verified HLE cohort, public integration 6d6021bb0 (your 599bff4a, including #5656, merged onto our 7bdb/main324 stack). Windows 11 26200, Ryzen 7 7800X3D (one CCD), RTX 5070 Ti, NVIDIA 617.42, 32 GiB, Release, SPIRV tools OFF, 3840x2160 output. No #6947 GPU heap, title binary/time patches or affinity change.

Both arms: PROFILE_DRAW unset, APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_STATS=0 APS5_PROFILE_GPU=1. The finisher counters check presence, so 0 still enables them, while avoiding Vulkan executable statistics (which require the value 1). First stats=1 startup intentionally stopped before any menu sample; it is excluded here. Also identical: draw cache1024, in-place draw inputs, resource cache16, host import4096MiB, texture cache2048MiB, local 16MiB import-window experiment and force-SDR. Settings JSON comparison confirms the only differences are DRAW_PIPELINE and trace output directory. Warm shader cache/pipeline journal; actual menu observed before selecting intervals.

arm six contained intervals presents FPS GPU busy ms/present
OFF 61.443007 s 120 1.95303 181.683
ON 61.384583 s 118 1.92231 183.040

One OFF/ON pair, animated menu, no clock lock: the ~1.6% difference is not evidence of a regression beyond run-to-run spread, and there is no gain here. This isolates the switch on a combined stack; it is not an OFF-versus-pristine-main result. No missing textures/obvious rendering change observed in the sampled menu screenshots; no pixel/flicker equivalence or audio check claimed.

Handoff verified: ON menu intervals hand roughly9.3–9.5k draws/10s to the finisher, zero finished on the worker; about320–334 packet drains, all reported as opcode0x49, roughly28 draws per drain. OFF consistently reports zero handoffs. So this is not an accidentally disabled finisher test.

Important profiling gap: DrawFinisher::run never calls PerformanceTrace::BindThread, so its CPU scopes are absent from the trace. Frame/present/GPU totals above remain usable, but I will not infer the finisher's CPU cost from those phase totals. Proposed fix on separate public branch:
https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-finisher-trace-oct19
3362ca612 adds BindThread("draw finisher") and extends the existing synthetic tracing fixture with configured/unconfigured finisher cases. With unchanged production, only the configured finisher case fails: draw worker CPU spans are absent from the trace; other3 controls pass. One-line production fix gives4/4 PASS0.52s; committed-head trace/relocation/user-word/metadata controls with the switch+proof verifier ON give8/8 PASS2.63s. Unconfigured tracing still allocates no trace buffer. Conventions pass; not runtime-staged or title-tested. Feel free to fold that commit and the two earlier Windows fixture fixes into your next rebase.

After timing, two bounded thread samples were collected, then Resume tested once with the same RAM guard. Still loading at the last observation. Exit03:03:22.637UTC, ~51.59s after Resume03:02:31.043: verified-runtime memory guard, after trim private30,179,135,488bytes (28.11GiB), free5.20GiB, three trims total. Private crossed the28GiB guard; no logged fatal/quadtree exception and no cinematic verified. Not a crash/#6172 fix claim, and no controlled load-time comparison. Finisher stays out of our performance baseline.

Official tools/trace_digest.py output for the measured windows follows. The largest CPU phase is inclusive across workers and lacks the unbound finisher as explained above. Raw title data/captures remain local. AI-assisted: Codex.

OFF trace_digest

6 intervals, 267.4 to 328.9 s, 120 presents
NVIDIA GeForce RTX 5070 Ti, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit 6d6021bb0ab4

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 267-278 20 518.5 561.9 569.3 569.3 181.2 100 % Driver.Packet 2536.6
2 278-288 19 541.6 567.4 585.7 585.7 191.1 101 % Driver.Packet 2637.0
3 288-298 20 506.0 570.5 572.4 572.4 181.0 100 % Driver.Packet 2519.8
4 298-308 20 544.3 556.5 556.6 556.6 179.9 100 % Driver.Packet 2609.2
5 308-318 20 490.3 566.4 597.4 597.4 186.8 101 % Driver.Packet 2511.7
6 318-329 21 492.3 567.6 585.0 585.0 171.0 100 % Driver.Packet 2475.0
p99 ms  @@@%@@  0-597.4
gpu ms  @@@%@%  0-191.1
ON trace_digest

6 intervals, 268.4 to 329.8 s, 118 presents
NVIDIA GeForce RTX 5070 Ti, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit 6d6021bb0ab4

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 268-279 20 511.6 570.2 583.5 583.5 185.2 101 % Driver.Packet 2511.1
2 279-289 19 552.9 590.4 592.1 592.1 188.2 100 % Driver.Packet 2661.6
3 289-299 20 516.3 573.9 596.3 596.3 183.5 101 % Driver.Packet 2542.1
4 299-309 20 506.8 556.8 564.1 564.1 180.7 100 % Driver.Packet 2497.3
5 309-319 19 527.8 583.4 584.8 584.8 183.3 100 % Driver.Packet 2585.9
6 319-330 20 521.0 564.0 565.0 565.0 177.6 100 % Driver.Packet 2550.6
p99 ms  @@@@@@  0-596.3
gpu ms  @@@@@%  0-188.2
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258772527 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6258772527). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-19T03:07:14Z. --- 007 Windows cross-test finished: **no clear finisher benefit in this menu**. Same binary and SHA-256-verified HLE cohort, public integration `6d6021bb0` (your `599bff4a`, including #5656, merged onto our 7bdb/main324 stack). Windows 11 26200, Ryzen 7 7800X3D (one CCD), RTX 5070 Ti, NVIDIA 617.42, 32 GiB, Release, SPIRV tools OFF, 3840x2160 output. No #6947 GPU heap, title binary/time patches or affinity change. Both arms: PROFILE_DRAW unset, `APS5_PIPELINED_DRAWS=32 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_STATS=0 APS5_PROFILE_GPU=1`. The finisher counters check presence, so 0 still enables them, while avoiding Vulkan executable statistics (which require the value 1). First stats=1 startup intentionally stopped before any menu sample; it is excluded here. Also identical: draw cache1024, in-place draw inputs, resource cache16, host import4096MiB, texture cache2048MiB, local 16MiB import-window experiment and force-SDR. Settings JSON comparison confirms the only differences are DRAW_PIPELINE and trace output directory. Warm shader cache/pipeline journal; actual menu observed before selecting intervals. | arm | six contained intervals | presents | FPS | GPU busy ms/present | |---|---:|---:|---:|---:| | OFF | 61.443007 s | 120 | 1.95303 | 181.683 | | ON | 61.384583 s | 118 | 1.92231 | 183.040 | One OFF/ON pair, animated menu, no clock lock: the ~1.6% difference is not evidence of a regression beyond run-to-run spread, and there is no gain here. This isolates the switch on a combined stack; it is not an OFF-versus-pristine-main result. No missing textures/obvious rendering change observed in the sampled menu screenshots; no pixel/flicker equivalence or audio check claimed. Handoff verified: ON menu intervals hand roughly9.3–9.5k draws/10s to the finisher, zero finished on the worker; about320–334 packet drains, all reported as opcode0x49, roughly28 draws per drain. OFF consistently reports zero handoffs. So this is not an accidentally disabled finisher test. Important profiling gap: `DrawFinisher::run` never calls `PerformanceTrace::BindThread`, so its CPU scopes are absent from the trace. Frame/present/GPU totals above remain usable, but I will not infer the finisher's CPU cost from those phase totals. Proposed fix on separate public branch: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-finisher-trace-oct19 **`3362ca612`** adds `BindThread("draw finisher")` and extends the existing synthetic tracing fixture with configured/unconfigured finisher cases. With unchanged production, only the configured finisher case fails: `draw worker CPU spans are absent from the trace`; other3 controls pass. One-line production fix gives4/4 PASS0.52s; committed-head trace/relocation/user-word/metadata controls with the switch+proof verifier ON give8/8 PASS2.63s. Unconfigured tracing still allocates no trace buffer. Conventions pass; not runtime-staged or title-tested. Feel free to fold that commit and the two earlier Windows fixture fixes into your next rebase. After timing, two bounded thread samples were collected, then Resume tested once with the same RAM guard. Still loading at the last observation. Exit03:03:22.637UTC, ~51.59s after Resume03:02:31.043: verified-runtime memory guard, after trim private30,179,135,488bytes (~28.11GiB), free~5.20GiB, three trims total. Private crossed the28GiB guard; no logged fatal/quadtree exception and no cinematic verified. Not a crash/#6172 fix claim, and no controlled load-time comparison. Finisher stays out of our performance baseline. Official `tools/trace_digest.py` output for the measured windows follows. The largest CPU phase is inclusive across workers and lacks the unbound finisher as explained above. Raw title data/captures remain local. AI-assisted: Codex. <details><summary>OFF trace_digest</summary> **6 intervals**, 267.4 to 328.9 s, 120 presents NVIDIA GeForce RTX 5070 Ti, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit 6d6021bb0ab4 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 267-278 | 20 | 518.5 | 561.9 | 569.3 | 569.3 | 181.2 | 100 % | Driver.Packet 2536.6 | | 2 | 278-288 | 19 | 541.6 | 567.4 | 585.7 | 585.7 | 191.1 | 101 % | Driver.Packet 2637.0 | | 3 | 288-298 | 20 | 506.0 | 570.5 | 572.4 | 572.4 | 181.0 | 100 % | Driver.Packet 2519.8 | | 4 | 298-308 | 20 | 544.3 | 556.5 | 556.6 | 556.6 | 179.9 | 100 % | Driver.Packet 2609.2 | | 5 | 308-318 | 20 | 490.3 | 566.4 | 597.4 | 597.4 | 186.8 | 101 % | Driver.Packet 2511.7 | | 6 | 318-329 | 21 | 492.3 | 567.6 | 585.0 | 585.0 | 171.0 | 100 % | Driver.Packet 2475.0 | ``` p99 ms @@@%@@ 0-597.4 gpu ms @@@%@% 0-191.1 ``` </details> <details><summary>ON trace_digest</summary> **6 intervals**, 268.4 to 329.8 s, 118 presents NVIDIA GeForce RTX 5070 Ti, NVIDIA 617.42, Windows 10.0.26200, 3840x2160, commit 6d6021bb0ab4 | # | seconds | presents | p50 | p90 | p99 | max | GPU busy | busiest worker | largest phase | |---|---|---|---|---|---|---|---|---|---| | 1 | 268-279 | 20 | 511.6 | 570.2 | 583.5 | 583.5 | 185.2 | 101 % | Driver.Packet 2511.1 | | 2 | 279-289 | 19 | 552.9 | 590.4 | 592.1 | 592.1 | 188.2 | 100 % | Driver.Packet 2661.6 | | 3 | 289-299 | 20 | 516.3 | 573.9 | 596.3 | 596.3 | 183.5 | 101 % | Driver.Packet 2542.1 | | 4 | 299-309 | 20 | 506.8 | 556.8 | 564.1 | 564.1 | 180.7 | 100 % | Driver.Packet 2497.3 | | 5 | 309-319 | 19 | 527.8 | 583.4 | 584.8 | 584.8 | 183.3 | 100 % | Driver.Packet 2585.9 | | 6 | 319-330 | 20 | 521.0 | 564.0 | 565.0 | 565.0 | 177.6 | 100 % | Driver.Packet 2550.6 | ``` p99 ms @@@@@@ 0-596.3 gpu ms @@@@@% 0-188.2 ``` </details>
mrfelek commented 2026-10-20 00:18:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-20T00:18:37Z.


ASTRO BOT (PPSA21564), Sky Garden, Linux RTX 3080 Ti: a data point for the head before today's rebase, d63a8044f, measured on its base 2fab88d10 (at that point it conflicted with main). Progress save, default settings, hands off from the level start, APS5_TEXTURE_CACHE_MIB=2816 on all three runs (otherwise the sampled texture cache thrashes there, #357). One run each.

Build Presents per 10 s queue 0 per draw capture / recompile / committer wait
2fab88d10 23.8 64 µs 21 / 16 / 14 µs
d63a8044f + APS5_DRAW_PIPELINE=1 28.6 50 µs 18 / 13 / 9.5 µs
d63a8044f without it 28.4 51 µs 18 / 13 / 11 µs
  • About +20% from that stack, but not from the finisher: with APS5_DRAW_PIPELINE=1 set, [finisher] reported 0 draws handed to it, and all ~167k draws per 10 s finished on the worker. Is there a condition in Sky Garden that keeps draws off it?
  • The data-only path (#5656) doesn't add hits here: ~99.5% of draw-cache lookups are "no entry" on all three. The user words that change per draw in this title are read by the stages, as buffer base addresses, so they stay part of the match.
  • The current head (fbe1f8b1e, on 0d8c51a54) no longer carries some of what was under the finisher at d63a8044f: the hand-off spin is in main via #6632, and c5da616a4 (straight-line SRT walk) is in neither. So the gain above may not carry over to the current head. I haven't measured it yet.

AI-assisted; the runs are from my machine(s).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6280282930 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6280282930). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-20T00:18:37Z. --- **ASTRO BOT (PPSA21564), Sky Garden, Linux RTX 3080 Ti:** a data point for the head before today's rebase, `d63a8044f`, measured on its base `2fab88d10` (at that point it conflicted with `main`). Progress save, default settings, hands off from the level start, `APS5_TEXTURE_CACHE_MIB=2816` on all three runs (otherwise the sampled texture cache thrashes there, #357). One run each. | Build | Presents per 10 s | queue 0 per draw | capture / recompile / committer wait | |---|---|---|---| | `2fab88d10` | 23.8 | 64 µs | 21 / 16 / 14 µs | | `d63a8044f` + `APS5_DRAW_PIPELINE=1` | 28.6 | 50 µs | 18 / 13 / 9.5 µs | | `d63a8044f` without it | 28.4 | 51 µs | 18 / 13 / 11 µs | - About +20% from that stack, but not from the finisher: with `APS5_DRAW_PIPELINE=1` set, `[finisher]` reported 0 draws handed to it, and all ~167k draws per 10 s finished on the worker. Is there a condition in Sky Garden that keeps draws off it? - The data-only path (#5656) doesn't add hits here: ~99.5% of draw-cache lookups are "no entry" on all three. The user words that change per draw in this title are read by the stages, as buffer base addresses, so they stay part of the match. - The current head (`fbe1f8b1e`, on `0d8c51a54`) no longer carries some of what was under the finisher at `d63a8044f`: the hand-off spin is in `main` via #6632, and `c5da616a4` (straight-line SRT walk) is in neither. So the gain above may not carry over to the current head. I haven't measured it yet. AI-assisted; the runs are from my machine(s).
mrfelek commented 2026-10-20 01:05:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-20T01:05:54Z.


Follow-up on the current head fbe1f8b1e, measured on its base 0d8c51a54. Same machine and settings as above, but started straight into the level with -lvl underwater_aerial_garden (no input, so every run starts the same way), APS5_TEXTURE_CACHE_MIB=2816, 17 intervals of 10 s from the level start, run alternately.

Build Runs Presents per 10 s queue 0 per draw
0d8c51a54 2 28.9, 29.9 49–50 µs
fbe1f8b1e without APS5_DRAW_PIPELINE 1 33.2 42.5 µs
fbe1f8b1e + APS5_DRAW_PIPELINE=1 2 33.3, 33.3 44 µs
  • About +13% on this head, again with or without the switch. [finisher] reported 0 draws handed to it on both pipeline runs, so the gain comes from what is active without it: capture 15.7 → 14.4 µs, recompile ~15 → 12.7 µs and the committer wait 8.2 → 6.5 µs per draw. The draw-cache hit rate is unchanged (~0.6%).
  • The open question stays: in Sky Garden no draw reaches the finisher.

AI-assisted; the runs are from my machine(s).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6280897641 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6280897641). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-20T01:05:54Z. --- **Follow-up on the current head `fbe1f8b1e`**, measured on its base `0d8c51a54`. Same machine and settings as above, but started straight into the level with `-lvl underwater_aerial_garden` (no input, so every run starts the same way), `APS5_TEXTURE_CACHE_MIB=2816`, 17 intervals of 10 s from the level start, run alternately. | Build | Runs | Presents per 10 s | queue 0 per draw | |---|---|---|---| | `0d8c51a54` | 2 | 28.9, 29.9 | 49–50 µs | | `fbe1f8b1e` without `APS5_DRAW_PIPELINE` | 1 | 33.2 | 42.5 µs | | `fbe1f8b1e` + `APS5_DRAW_PIPELINE=1` | 2 | 33.3, 33.3 | 44 µs | - About +13% on this head, again with or without the switch. `[finisher]` reported 0 draws handed to it on both pipeline runs, so the gain comes from what is active without it: capture 15.7 → 14.4 µs, recompile ~15 → 12.7 µs and the committer wait 8.2 → 6.5 µs per draw. The draw-cache hit rate is unchanged (~0.6%). - The open question stays: in Sky Garden no draw reaches the finisher. AI-assisted; the runs are from my machine(s).
oneandonlydean commented 2026-10-20 01:53:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T01:53:25Z.


@mrfelek On the 0 handed to the finisher: APS5_PROFILE_DRAW turns the hand-off off (it is only taken when profiling is off), and the [finisher] line prints only under APS5_PROFILE_DRAW or APS5_PIPELINE_STATS. If APS5_PROFILE_DRAW was set in those runs, 0 is what it does, and the per-draw capture / recompile / committer-wait breakdown suggests it was. Please rerun with APS5_DRAW_PIPELINE=1 APS5_PIPELINE_STATS=1 and APS5_PROFILE_DRAW unset, and paste the [finisher] line. Indirect draws are never handed off either, so if that level is mostly indirect, 0 can still be right after that change; the line should tell which.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6281482545 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6281482545). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T01:53:25Z. --- @mrfelek On the 0 handed to the finisher: `APS5_PROFILE_DRAW` turns the hand-off off (it is only taken when profiling is off), and the `[finisher]` line prints only under `APS5_PROFILE_DRAW` or `APS5_PIPELINE_STATS`. If `APS5_PROFILE_DRAW` was set in those runs, 0 is what it does, and the per-draw capture / recompile / committer-wait breakdown suggests it was. Please rerun with `APS5_DRAW_PIPELINE=1 APS5_PIPELINE_STATS=1` and `APS5_PROFILE_DRAW` unset, and paste the `[finisher]` line. Indirect draws are never handed off either, so if that level is mostly indirect, 0 can still be right after that change; the line should tell which.
mrfelek commented 2026-10-20 10:29:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-20T10:29:32Z.


@oneandonlydean you were right, thanks: APS5_PROFILE_DRAW was set in those runs. Rerun on fbe1f8b1e (base 0d8c51a54), Sky Garden via -lvl underwater_aerial_garden, no input, APS5_TEXTURE_CACHE_MIB=2816, APS5_PROFILE_DRAW unset, presents from APS5_TRACE_SUMMARY_EVERY=10 (17 intervals from the level start), run alternately:

Build Presents per 10 s
0d8c51a54 29.5, 30.4
fbe1f8b1e, APS5_PIPELINE_STATS=1 only 35.5
fbe1f8b1e + APS5_DRAW_PIPELINE=1 APS5_PIPELINE_STATS=1 35.8, 36.6
[finisher] draws (10 s): 206791 handed to the draw finisher, 117 finished on the worker; worker drains of the finisher (drained/skipped): lookup 0/870 reads 0/682 packet 2538/132869 kept draw 0/0
[finisher] draws (10 s): 211507 handed to the draw finisher, 105 finished on the worker; worker drains of the finisher (drained/skipped): lookup 0/780 reads 0/649 packet 2389/125908 kept draw 0/0

So the hand-off works in this level, almost every draw goes to the finisher, and the switch adds about 1 present per 10 s on top of the rest of the stack here. The +20% over the base is mostly what's active without it. One run without the switch, so that last step is close to noise.

AI-assisted; the runs are from my machine(s).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288872995 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6288872995). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-20T10:29:32Z. --- @oneandonlydean you were right, thanks: `APS5_PROFILE_DRAW` was set in those runs. Rerun on `fbe1f8b1e` (base `0d8c51a54`), Sky Garden via `-lvl underwater_aerial_garden`, no input, `APS5_TEXTURE_CACHE_MIB=2816`, `APS5_PROFILE_DRAW` unset, presents from `APS5_TRACE_SUMMARY_EVERY=10` (17 intervals from the level start), run alternately: | Build | Presents per 10 s | |---|---| | `0d8c51a54` | 29.5, 30.4 | | `fbe1f8b1e`, `APS5_PIPELINE_STATS=1` only | 35.5 | | `fbe1f8b1e` + `APS5_DRAW_PIPELINE=1 APS5_PIPELINE_STATS=1` | 35.8, 36.6 | ``` [finisher] draws (10 s): 206791 handed to the draw finisher, 117 finished on the worker; worker drains of the finisher (drained/skipped): lookup 0/870 reads 0/682 packet 2538/132869 kept draw 0/0 [finisher] draws (10 s): 211507 handed to the draw finisher, 105 finished on the worker; worker drains of the finisher (drained/skipped): lookup 0/780 reads 0/649 packet 2389/125908 kept draw 0/0 ``` So the hand-off works in this level, almost every draw goes to the finisher, and the switch adds about 1 present per 10 s on top of the rest of the stack here. The +20% over the base is mostly what's active without it. One run without the switch, so that last step is close to noise. AI-assisted; the runs are from my machine(s).
oneandonlydean commented 2026-10-22 03:18:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-22T03:18:45Z.


@Raghav314 full CI on de31751e98 has one failure, on Windows only: agc_driver_draw_finisher_trace (#974) is counted as Failed, and its only output is the stub's "skipped, this build leaves the test out with ANYPS5_AGC_EXECUTION_TESTS". Linux, both macOS relinker lanes and relinker-asan pass.

The Windows job builds only part of tests/execution. Every test it leaves out is built from tests/ExecutionTestNotBuilt.cpp, which returns 77, so each test needs SKIP_RETURN_CODE 77 for ctest to count it as skipped. The test added in "include draw finisher work in CPU traces" is registered by hand (core/libs/prx/libSceAgcDriver/CMakeLists.txt:2325-2327) and its set_tests_properties has no SKIP_RETURN_CODE. The two _disabled variants next to it have it (lines 2324 and 2333) and show as Skipped in the same run. Adding SKIP_RETURN_CODE 77 to the agc_driver_draw_finisher_trace properties should fix it:

set_tests_properties(agc_driver_draw_finisher_trace PROPERTIES
        ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_DRAW_PIPELINE=1;APS5_PIPELINED_DRAWS=8;APS5_TRACE_FRAMES=0:1;APS5_TRACE_EVENTS=64" SKIP_RETURN_CODE 77 TIMEOUT 30)

One more thing while you're in that file: agc_driver_draw_cache_relocation isn't in agcDrawPipelineTests, so CI never runs it with APS5_DRAW_PIPELINE=1. That is the test that caught the SRT-walk problem in the earlier change request. Adding it to the list would keep that covered.

The rest of the delta from fbe1f8b1ec looks right to me: the shutdown release runs after the finisher drain and the committer join and before device.Reset(), and the rebase resolutions match main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331835290 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6331835290). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-22T03:18:45Z. --- @Raghav314 full CI on de31751e98 has one failure, on Windows only: `agc_driver_draw_finisher_trace` (#974) is counted as Failed, and its only output is the stub's "skipped, this build leaves the test out with ANYPS5_AGC_EXECUTION_TESTS". Linux, both macOS relinker lanes and relinker-asan pass. The Windows job builds only part of `tests/execution`. Every test it leaves out is built from `tests/ExecutionTestNotBuilt.cpp`, which returns 77, so each test needs `SKIP_RETURN_CODE 77` for ctest to count it as skipped. The test added in "include draw finisher work in CPU traces" is registered by hand (`core/libs/prx/libSceAgcDriver/CMakeLists.txt:2325-2327`) and its `set_tests_properties` has no `SKIP_RETURN_CODE`. The two `_disabled` variants next to it have it (lines 2324 and 2333) and show as Skipped in the same run. Adding `SKIP_RETURN_CODE 77` to the `agc_driver_draw_finisher_trace` properties should fix it: ```cmake set_tests_properties(agc_driver_draw_finisher_trace PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_DRAW_PIPELINE=1;APS5_PIPELINED_DRAWS=8;APS5_TRACE_FRAMES=0:1;APS5_TRACE_EVENTS=64" SKIP_RETURN_CODE 77 TIMEOUT 30) ``` One more thing while you're in that file: `agc_driver_draw_cache_relocation` isn't in `agcDrawPipelineTests`, so CI never runs it with `APS5_DRAW_PIPELINE=1`. That is the test that caught the SRT-walk problem in the earlier change request. Adding it to the list would keep that covered. The rest of the delta from fbe1f8b1ec looks right to me: the shutdown release runs after the finisher drain and the committer join and before `device.Reset()`, and the rebase resolutions match main.
EagleBearerYS commented 2026-10-22 06:36:40 +00:00 (Migrated from github.com)

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


@Raghav314, in case it saves you a round trip: oneandonlydean's two requests above are ready as two commits on top of your de31751e98, on EagleBearerYS:fix/6946-finisher-trace-skip (6e9279bcef):

  • 53425de8be adds SKIP_RETURN_CODE 77 to agc_driver_draw_finisher_trace, so a Windows build that leaves the test out counts it as skipped;
  • 6e9279bcef adds agc_driver_draw_cache_relocation to agcDrawPipelineTests, so CI also runs it with APS5_DRAW_PIPELINE=1.

Tested:

  • The Windows job's case, on Linux: configured with the Windows job's -DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown, so agc_driver_draw_pipeline_trace_tests is the stub.
    • On de31751e98, ctest -R '^agc_driver_draw_(finisher|pipeline)_trace(_disabled)?$' fails agc_driver_draw_finisher_trace with "skipped, this build leaves the test out with ANYPS5_AGC_EXECUTION_TESTS", as in the Windows CI run oneandonlydean describes, and skips the other three.
    • With these commits all four are skipped.
  • Every execution test built (Linux, lavapipe): agc_driver_draw_cache_relocation, agc_driver_draw_pipeline_trace, agc_driver_draw_finisher_trace, both _disabled variants and the new agc_driver_draw_cache_relocation_draw_pipeline pass. The new one passed 10 of 10. check_test_registration.py and check_conventions.py --base de31751e98 --head 6e9279bcef pass.
  • GitHub's Linux and Windows runners (run): the same tests pass on Linux, three runs each, and none fails on Windows, where the Vulkan tests skip.

The branch fast-forwards from your head (git pull https://github.com/EagleBearerYS/AnyPS5 fix/6946-finisher-trace-skip), or you can make the same two edits yourself, whichever is easier.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6334445190 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6334445190). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T06:36:40Z. --- @Raghav314, in case it saves you a round trip: oneandonlydean's two requests above are ready as two commits on top of your de31751e98, on [`EagleBearerYS:fix/6946-finisher-trace-skip`](https://github.com/EagleBearerYS/AnyPS5/tree/fix/6946-finisher-trace-skip) (6e9279bcef): - [53425de8be](https://github.com/EagleBearerYS/AnyPS5/commit/53425de8be) adds `SKIP_RETURN_CODE 77` to `agc_driver_draw_finisher_trace`, so a Windows build that leaves the test out counts it as skipped; - [6e9279bcef](https://github.com/EagleBearerYS/AnyPS5/commit/6e9279bcef) adds `agc_driver_draw_cache_relocation` to `agcDrawPipelineTests`, so CI also runs it with `APS5_DRAW_PIPELINE=1`. Tested: - **The Windows job's case, on Linux:** configured with the Windows job's `-DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown`, so `agc_driver_draw_pipeline_trace_tests` is the stub. - On de31751e98, `ctest -R '^agc_driver_draw_(finisher|pipeline)_trace(_disabled)?$'` fails `agc_driver_draw_finisher_trace` with "skipped, this build leaves the test out with ANYPS5_AGC_EXECUTION_TESTS", as in the Windows CI run oneandonlydean describes, and skips the other three. - With these commits all four are skipped. - **Every execution test built (Linux, lavapipe):** `agc_driver_draw_cache_relocation`, `agc_driver_draw_pipeline_trace`, `agc_driver_draw_finisher_trace`, both `_disabled` variants and the new `agc_driver_draw_cache_relocation_draw_pipeline` pass. The new one passed 10 of 10. `check_test_registration.py` and `check_conventions.py --base de31751e98 --head 6e9279bcef` pass. - **GitHub's Linux and Windows runners** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39729235084)): the same tests pass on Linux, three runs each, and none fails on Windows, where the Vulkan tests skip. The branch fast-forwards from your head (`git pull https://github.com/EagleBearerYS/AnyPS5 fix/6946-finisher-trace-skip`), or you can make the same two edits yourself, whichever is easier.
Raghav314 commented 2026-10-22 10:53:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-22T10:53:41Z.


@oneandonlydean @EagleBearerYS thanks, both are in. I took EagleBearerYS's two commits as they are (fast-forward to 6e9279bcef): SKIP_RETURN_CODE 77 on agc_driver_draw_finisher_trace, and agc_driver_draw_cache_relocation in agcDrawPipelineTests. Locally the relocation test, its new _draw_pipeline variant and the four trace tests pass. #9508 is rebased onto it and also passes the new agc_driver_draw_cache_relocation_gpu_heap.

LLM assistance used.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6338998735 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6338998735). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-22T10:53:41Z. --- @oneandonlydean @EagleBearerYS thanks, both are in. I took EagleBearerYS's two commits as they are (fast-forward to 6e9279bcef): `SKIP_RETURN_CODE 77` on `agc_driver_draw_finisher_trace`, and `agc_driver_draw_cache_relocation` in `agcDrawPipelineTests`. Locally the relocation test, its new `_draw_pipeline` variant and the four trace tests pass. #9508 is rebased onto it and also passes the new `agc_driver_draw_cache_relocation_gpu_heap`. LLM assistance used.
EagleBearerYS commented 2026-10-22 11:27:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T11:27:50Z.


@Raghav314 a merge-order note for this PR and #9521 against several of ours, to keep it to one message. Ours go after this PR in each case, and rebase over it:

  • #7446 (Draw.cpp): this PR changes the pipelined block's condition to tail.queue == nullptr || deferredLabels().labels.empty(). #7446 adds a capture check inside that block: runCaptureCheckHook, then a redo under RecaptureScope when the captured memory changed. Composed: your condition with the check inside.
  • #9129 (DrawCacheStatistics.cpp): both extend the [draw-cache] line. Composed, it prints both sets of fields.
  • #8963 (ShaderResources.hpp): adjacent declarations, its SpirvFaultReportOnly and your ShaderStoresThroughAddresses. Both stay.
  • #6146 (DrawPrecheck.cpp): #6146 decodes the DB depth expand pass next to the colour metadata pass, in one if (metadata || expand) branch, and this PR pipelines the colour metadata pass. Composed: a colour metadata pass takes your pipelined branch when it applies; otherwise it takes #6146's shared branch, like a depth expand. The include lines keep both.
  • #9533 and #9717 (DrawPrecheck.cpp): only the include lines. Both stay.

#9521 and #6682 (UnitShadow.cpp) need more than a text merge. #9521 stores a completion-time publish on the CPU (PublishOnCpuScope, then recordCopiesOnCpu's guarded store at completion). #6682 adds a waited argument to PublishShadow, so a publish made while a completion is being waited for goes ahead, instead of being skipped as a store-site read during completion. They change different steps: #6682 decides whether PublishShadow publishes, and #9521 decides how publishUnits records it. What we'd check in the composition is a waited publish inside a PublishOnCpuScope: its CPU store has to land before the waiter reads. Since #9521's review is still open, I'd propose #6682 goes first and #9521 rebases over it. If you'd rather #9521 went first, #6682 can rebase instead.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339617623 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6339617623). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T11:27:50Z. --- @Raghav314 a merge-order note for this PR and #9521 against several of ours, to keep it to one message. Ours go after this PR in each case, and rebase over it: - **#7446** (`Draw.cpp`): this PR changes the pipelined block's condition to `tail.queue == nullptr || deferredLabels().labels.empty()`. #7446 adds a capture check inside that block: `runCaptureCheckHook`, then a redo under `RecaptureScope` when the captured memory changed. Composed: your condition with the check inside. - **#9129** (`DrawCacheStatistics.cpp`): both extend the `[draw-cache]` line. Composed, it prints both sets of fields. - **#8963** (`ShaderResources.hpp`): adjacent declarations, its `SpirvFaultReportOnly` and your `ShaderStoresThroughAddresses`. Both stay. - **#6146** (`DrawPrecheck.cpp`): #6146 decodes the DB depth expand pass next to the colour metadata pass, in one `if (metadata || expand)` branch, and this PR pipelines the colour metadata pass. Composed: a colour metadata pass takes your pipelined branch when it applies; otherwise it takes #6146's shared branch, like a depth expand. The include lines keep both. - **#9533 and #9717** (`DrawPrecheck.cpp`): only the include lines. Both stay. **#9521 and #6682** (`UnitShadow.cpp`) need more than a text merge. #9521 stores a completion-time publish on the CPU (`PublishOnCpuScope`, then `recordCopiesOnCpu`'s guarded store at completion). #6682 adds a `waited` argument to `PublishShadow`, so a publish made while a completion is being waited for goes ahead, instead of being skipped as a store-site read during completion. They change different steps: #6682 decides whether `PublishShadow` publishes, and #9521 decides how `publishUnits` records it. What we'd check in the composition is a waited publish inside a `PublishOnCpuScope`: its CPU store has to land before the waiter reads. Since #9521's review is still open, I'd propose #6682 goes first and #9521 rebases over it. If you'd rather #9521 went first, #6682 can rebase instead.
Raghav314 commented 2026-10-22 14:15:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Raghav314 on 2026-10-22T14:15:41Z.


@EagleBearerYS thanks, the compositions match what this PR changes: the pipelined block's condition with #7446's capture check inside it, both field sets on the [draw-cache] line, both declarations in ShaderResources.hpp, and the colour metadata pass taking the pipelined branch when it applies, otherwise #6146's shared branch.

For #9521 and #6682: either order works for me, I'll rebase #9521 as needed depending on which merges first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342959177 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6342959177). Originally posted by [Raghav314](https://github.com/Raghav314) on 2026-10-22T14:15:41Z. --- @EagleBearerYS thanks, the compositions match what this PR changes: the pipelined block's condition with #7446's capture check inside it, both field sets on the `[draw-cache]` line, both declarations in ShaderResources.hpp, and the colour metadata pass taking the pipelined branch when it applies, otherwise #6146's shared branch. For #9521 and #6682: either order works for me, I'll rebase #9521 as needed depending on which merges first.
ps54all commented 2026-10-22 15:00:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-22T15:00:06Z.


@Raghav314 MinGW confirm on the current head 19c55cd3d (on main 8b3e39832), Windows 11, WinLibs GCC 15.2.0 Release, RTX 3080 10 GB (NVIDIA 610.74):

  • The full build and --target libs complete with no errors. Only the usual libstdc++ -Wstringop-overread warnings and one 'NOMINMAX' redefined in GuestFopenLongHostPath.cpp, which main has too.
  • ctest -j8: 1916 of 1921 pass, including all 22 *_draw_pipeline tests. The 5 failures also fail on main here and do not come from this PR:
    • pr_overlap_tools, check_main_sync: our git 2.30.1 has no merge-tree --write-tree.
    • agc_driver_sample_order, agc_driver_sample_order_grid_reference, agc_driver_sample_order_recipe_depth_locations: the NVIDIA failure tracked in #9056.

I did not run a title with APS5_DRAW_PIPELINE on this head.

(AI-assisted: the build, tests and this comment were done with Claude Code.)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343915228 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6946#issuecomment-6343915228). Originally posted by [ps54all](https://github.com/ps54all) on 2026-10-22T15:00:06Z. --- @Raghav314 MinGW confirm on the current head 19c55cd3d (on `main` 8b3e39832), Windows 11, WinLibs GCC 15.2.0 Release, RTX 3080 10 GB (NVIDIA 610.74): - The full build and `--target libs` complete with no errors. Only the usual libstdc++ `-Wstringop-overread` warnings and one `'NOMINMAX' redefined` in `GuestFopenLongHostPath.cpp`, which `main` has too. - `ctest -j8`: 1916 of 1921 pass, including all 22 `*_draw_pipeline` tests. The 5 failures also fail on `main` here and do not come from this PR: - `pr_overlap_tools`, `check_main_sync`: our git 2.30.1 has no `merge-tree --write-tree`. - `agc_driver_sample_order`, `agc_driver_sample_order_grid_reference`, `agc_driver_sample_order_recipe_depth_locations`: the NVIDIA failure tracked in #9056. I did not run a title with `APS5_DRAW_PIPELINE` on this head. (AI-assisted: the build, tests and this comment were done with Claude Code.)
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!6946
No description provided.