perf(agc): keep moved read-only draw inputs within the draw snapshot cap #15783

Merged
mrfelek merged 1 commit from upstream-pr/15783 into main 2026-11-04 19:18:55 +00:00
mrfelek commented 2026-11-04 14:44:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-11-04T14:44:10Z.


What

PrepareDrawBindings caps the read-only input snapshots of a draw at the draw snapshot budget (APS5_DRAW_SNAPSHOT_MAX_MIB, 64 MiB). An input over the budget is bound in place, not copied. A cached draw whose read-only inputs moved to another address reaches PrepareDrawBindings through MovedReadOnlyBuffers. Those moved inputs are snapshotted whatever their size, because the cap check skips inputs passed as moved.

MovedReadOnlyBuffers now refuses a move when the moved inputs together exceed the budget. The draw then builds its resources, as it does for any other refused move, and binds those inputs in place under the existing rule. Moves within the budget are unchanged.

Why it matters. In PPSA22408 (Hot Wheels Infinite Rush) and PPSA28416 (Star Wars Galactic Racer), both UE5, a 96 MiB and a 48 MiB storage buffer are bound read-only by draws at moving addresses. Compute passes write them earlier in the frame, so MarkDirectWrites stamps their whole range. Every reuse then refreshes the snapshot: refreshDrawSnapshot compares all of it on the draw committer while holding the GPU mutex, and only a few percent of it differs. With a temporary counter, that's about 6.2 GB compared per 10 s in the PPSA22408 garage (Radeon 780M) and about 14 GB in the PPSA28416 title screen (RTX 3080 Ti). The main queue worker waits for that mutex.

Changes:

  • ShaderResources.cpp, MovedReadOnlyBuffers: a running total of the moved read-only inputs. The move is refused when the next input doesn't fit in maxDrawSnapshotBytes, the same per-resources budget PrepareDrawBindings applies.
  • tests/Recorder.cpp, drawSnapshotCapTests (the cap is 1 MiB there):
    • a moved input below the cap is still moved and snapshotted at its new address;
    • a moved 1 MiB + 4 KiB input is refused;
    • two moved 600 KiB inputs (1.2 MiB together) are refused.
  • docs/dev/debt/libSceAgcDriver.md: the draw input snapshot entry says that moved inputs obey the same budget.

Overlap: #9897, #14032 and #14944 also touch MovedReadOnlyBuffers. #9897 and #14032 add a parameter, and #14944 calls it from a test. None of them touch the cap, so the overlap is textual only. #9897 and #14032 bound some inputs to the vertex or instance range a draw reads, which makes more moves fit the budget, so they complement this change. Their A/B on PPSA28416 didn't change these two buffers, which aren't indexed by vertex or instance.

Tested

Unit test and controls, RTX 3080 Ti (NVIDIA 615.71.09), Ubuntu 26.10 (Linux 7.3):

  • agc_driver_recorder_tests --draw-snapshot-cap-only passes on this head.
  • Control 1: with only the ShaderResources.cpp change removed, it fails at a moved input exceeding the draw snapshot cap was moved and would be snapshotted.
  • Control 2: with a per-input check (bytes > maxDrawSnapshotBytes) instead of the running total, it fails at moved inputs exceeding the draw snapshot cap together were moved and would be snapshotted.

Focused suites: agc_driver_recorder_tests (whole suite and --draw-snapshot-cap-only) on main b11c7bf84f and on this head, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Both sides pass, there are no VUID- messages on either side and no missing-layer line. tools/check_conventions.py --base origin/main passes.

PPSA22408 garage menu, 3840x2160, the game's default settings, the same input route into the garage each run:

  • Trees: A = main b11c7bf84f. B = this head cac7977ba0, built from the same tree with only the driver rebuilt, so only libSceAgcDriver.prx differs.
  • Run setup: each runtime had one warm-up run first that isn't counted, and then the runs alternated A B A B.
  • Env: no APS5_PROFILE_*; the summary records below show each run's env. On the 780M the input route finds the screens from frame dumps, which are on for both A and B.
  • Both sides: both runtimes use the same libSceHttp2.prx from an earlier build.
  • FPS: presents per second over the last 12 summary windows in the garage.
  • Errors: no exceptions in any run.
A run 1 B run 1 A run 2 B run 2
RTX 3080 Ti, Ryzen 9 5950X, Linux 7.3 7.10 7.20 7.08 7.34 +2.6 %
Radeon 780M (RADV Mesa 26.0.8), Ryzen 9 PRO 8945HS, Linux 7.0 3.17 3.25 3.16 3.26 +3 %

On the 3080 Ti the frame p50 goes from about 140.5 to 136–139 ms, and GPU busy per present stays at about 80.5 ms.

With APS5_DRAW_SNAPSHOT_MAX_MIB=16 on both sides (one run each, not a request to change the default):

A B
RTX 3080 Ti 7.49 7.73
Radeon 780M 3.37 3.47

At 16 MiB the 48 MiB buffer leaves the snapshot path in A too, and this change removes the moved 96 MiB one as well. That's about +9 % over plain main on both GPUs, against +3 % from the change alone at the default budget. A lower default would bind more inputs in place, so it's a separate question.

Traces, one per tree on the 3080 Ti: APS5_TRACE_SECONDS=150:10 APS5_TRACE_EVENTS=2097152, no other APS5_TRACE_* or APS5_PROFILE_*. Per frame, the draw committer's Graphics.Draw goes from 24.6 to 21.6 ms and the main queue worker's busy time from 125.2 to 121.5 ms. The game's output went to a file (headless run).

Traces: A · B

trace_digest.py: A (main b11c7bf84f)
**seconds 150:10** from present 3312: 72 presents, frame p50 139.9 / p90 143.7 / p99 148.1 / max 148.1 ms, GPU busy 80.4 ms per present
NVIDIA GeForce RTX 3080 Ti, NVIDIA 615.71.09, Linux 7.3.0-10-generic, 3840x2160, commit b11c7bf84f5d, dropped: no

```json
{"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_EVENTS":"2097152","APS5_TRACE_SECONDS":"150:10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS\u2122\ufe0f Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 150:10","first_present":3312,"ms":10028.729},"presents":72,"frame_ms":{"p50":139.915,"p90":143.73,"p99":148.056,"max":148.056},"gpu_busy_ms_per_present":80.414,"worker_busy_pct":{"queue worker 0x0":99.401,"queue worker 0x20":99.285},"top_phases_ms_per_frame":{"Driver.Packet":276.658,"Driver.Packet.memory_wait":129.855,"Driver.Packet.dispatch":74.544,"Driver.Dispatch":73.481,"Vulkan.Dispatch":52.22,"Vulkan.Dispatch.shader_resources":47.629,"Resources.Complete":40.355,"Driver.Packet.draw":39.658},"trace_dropped":false,"trace":"aps5-trace-b11c7bf84f5d-1396560.json.gz"}
```

**Slowest frames** (largest slices inside each, inclusive)

- present 3365: 148.1 ms at 7391 ms: Driver.Packet (queue worker 0x20) 147.6, Driver.Packet (queue worker 0x0) 140.9, Driver.Packet.memory_wait (queue worker 0x20) 133.1, batch (gpu) 82.5
- present 3380: 146.8 ms at 9474 ms: Driver.Packet (queue worker 0x20) 146.3, Driver.Packet (queue worker 0x0) 139.8, Driver.Packet.memory_wait (queue worker 0x20) 132.3, batch (gpu) 81.7
- present 3333: 146.7 ms at 2925 ms: Driver.Packet (queue worker 0x20) 146.2, Driver.Packet (queue worker 0x0) 139.5, Driver.Packet.memory_wait (queue worker 0x20) 132.2, batch (gpu) 79.9
- present 3326: 144.9 ms at 1947 ms: Driver.Packet (queue worker 0x20) 144.4, Driver.Packet (queue worker 0x0) 137.8, Driver.Packet.memory_wait (queue worker 0x20) 132.6, batch (gpu) 81.9
- present 3372: 144.8 ms at 8373 ms: Driver.Packet (queue worker 0x20) 144.3, Driver.Packet (queue worker 0x0) 137.9, Driver.Packet.memory_wait (queue worker 0x20) 133.6, batch (gpu) 80.4

**Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

- present 3365: 148.1 ms at 7391 ms, persistence 16.5 ms
- present 3380: 146.8 ms at 9474 ms, persistence 15.2 ms
- present 3333: 146.7 ms at 2925 ms, persistence 14.6 ms
- present 3337: 144.8 ms at 3481 ms, persistence 12.2 ms
- present 3372: 144.8 ms at 8373 ms, persistence 12.2 ms
- present 3326: 144.9 ms at 1947 ms, persistence 11.1 ms
- present 3318: 143.0 ms at 839 ms, persistence 10.9 ms
- present 3349: 144.7 ms at 5154 ms, persistence 10.6 ms
- present 3357: 143.3 ms at 6269 ms, persistence 9.2 ms
- present 3341: 142.3 ms at 4042 ms, persistence 8.3 ms

**Threads** (ms per frame)

| thread | busy | wait | untraced | in slices < 20 us | largest |
|---|---|---|---|---|---|
| queue worker 0x0 | 125.2 (90 %) | 7.0 (5 %) | 7.0 | 37.3 | Driver.Packet 132.2, Driver.EndSubmission 0.0 |
| draw committer | 25.6 (18 %) | 0.9 (1 %) | 112.8 | 3.4 | Graphics.Draw 24.6, Recorder.Sync 0.8 |
| queue worker 0x20 | 4.8 (3 %) | 133.3 (96 %) | 1.2 | 2.9 | Driver.Packet 137.9, Driver.EndSubmission 0.0 |
| presenter | 0.5 (0 %) | 0.0 (0 %) | 138.7 | 0.1 | VideoOut.Flip 0.5, Driver.Present 0.0 |
| gpu | 80.4 (58 %) | 0.0 (0 %) | 58.9 | 0.0 | batch 80.4 |

**Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 270.1, Driver.Packet.memory_wait 129.8, batch 80.4, Driver.Packet.dispatch 74.3, Driver.Dispatch 73.3, Vulkan.Dispatch 51.0, Vulkan.Dispatch.shader_resources 45.7, Resources.Complete 39.5, Driver.Packet.draw 38.9, Driver.Draw 38.7

**Longest waits**

- Driver.Packet.memory_wait (queue worker 0x20) 70.6 ms at 7485 ms, present 3365
- Driver.Packet.memory_wait (queue worker 0x20) 69.5 ms at 511 ms, present 3315
- Driver.Packet.memory_wait (queue worker 0x20) 69.4 ms at 6360 ms, present 3357
- Driver.Packet.memory_wait (queue worker 0x20) 69.2 ms at 8460 ms, present 3372
- Driver.Packet.memory_wait (queue worker 0x20) 68.9 ms at 4125 ms, present 3341
- Driver.Packet.memory_wait (queue worker 0x20) 68.8 ms at 3014 ms, present 3333
- Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 3717 ms, present 3338
- Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 7910 ms, present 3368
- Driver.Packet.memory_wait (queue worker 0x20) 68.4 ms at 230 ms, present 3313
- Driver.Packet.memory_wait (queue worker 0x20) 68.4 ms at 3575 ms, present 3337

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

- batch 2506: 20.1 ms at 4219 ms, present 3342: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.5, GpuMutex.wait.label (draw committer) 0.0
- batch 3492: 19.9 ms at 5887 ms, present 3354: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.9, Graphics.Draw.draw_and_resource_release (draw committer) 1.7
- batch 26: 19.7 ms at 37 ms, present 3312: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.4, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, Graphics.Draw.index_upload (draw committer) 0.1, GpuMutex.wait.draw (draw committer) 0.0
- batch 4397: 19.5 ms at 7429 ms, present 3365: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, GpuMutex.wait.draw (draw committer) 0.0
- batch 4632: 19.3 ms at 7853 ms, present 3368: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.5, Graphics.Draw.draw_and_resource_release (draw committer) 1.3
trace_digest.py: B (this head)
**seconds 150:10** from present 3326: 74 presents, frame p50 135.8 / p90 138.8 / p99 147.9 / max 147.9 ms, GPU busy 80.2 ms per present
NVIDIA GeForce RTX 3080 Ti, NVIDIA 615.71.09, Linux 7.3.0-10-generic, 3840x2160, commit cac7977ba098, dropped: no

```json
{"commit":"cac7977ba098","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_EVENTS":"2097152","APS5_TRACE_SECONDS":"150:10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS\u2122\ufe0f Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 150:10","first_present":3326,"ms":10060.974},"presents":74,"frame_ms":{"p50":135.848,"p90":138.811,"p99":147.909,"max":147.909},"gpu_busy_ms_per_present":80.175,"worker_busy_pct":{"queue worker 0x0":99.372,"queue worker 0x20":99.296},"top_phases_ms_per_frame":{"Driver.Packet":270.012,"Driver.Packet.memory_wait":129.55,"Driver.Packet.dispatch":71.771,"Driver.Dispatch":70.715,"Vulkan.Dispatch":52.243,"Vulkan.Dispatch.shader_resources":47.633,"Resources.Complete":40.307,"Driver.Packet.draw":38.992},"trace_dropped":false,"trace":"aps5-trace-cac7977ba098-1403987.json.gz"}
```

**Slowest frames** (largest slices inside each, inclusive)

- present 3364: 147.9 ms at 5160 ms: Driver.Packet (queue worker 0x20) 147.4, Driver.Packet (queue worker 0x0) 140.7, Driver.Packet.memory_wait (queue worker 0x20) 140.3, batch (gpu) 81.1
- present 3328: 140.6 ms at 277 ms: Driver.Packet (queue worker 0x20) 140.1, Driver.Packet.memory_wait (queue worker 0x20) 133.2, Driver.Packet (queue worker 0x0) 132.9, batch (gpu) 80.2
- present 3392: 140.2 ms at 8971 ms: Driver.Packet (queue worker 0x20) 139.6, Driver.Packet (queue worker 0x0) 133.0, Driver.Packet.memory_wait (queue worker 0x20) 129.4, batch (gpu) 80.4
- present 3326: 139.7 ms at 0 ms: Driver.Packet (queue worker 0x0) 132.1, Driver.Packet (queue worker 0x20) 122.3, Driver.Packet.memory_wait (queue worker 0x20) 112.0, batch (gpu) 80.7
- present 3376: 139.4 ms at 6801 ms: Driver.Packet (queue worker 0x20) 139.0, Driver.Packet (queue worker 0x0) 132.4, Driver.Packet.memory_wait (queue worker 0x20) 130.5, batch (gpu) 80.6

**Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)

- present 3364: 147.9 ms at 5160 ms, persistence 16.5 ms
- present 3328: 140.6 ms at 277 ms, persistence 9.2 ms
- present 3392: 140.2 ms at 8971 ms, persistence 8.7 ms
- present 3376: 139.4 ms at 6801 ms, persistence 6.8 ms
- present 3352: 138.8 ms at 3535 ms, persistence 6.7 ms
- present 3336: 139.0 ms at 1365 ms, persistence 6.6 ms
- present 3340: 138.3 ms at 1908 ms, persistence 6.3 ms
- present 3383: 138.2 ms at 7753 ms, persistence 5.7 ms
- present 3338: 138.7 ms at 1637 ms, persistence 5.6 ms
- present 3371: 139.0 ms at 6123 ms, persistence 5.6 ms

**Threads** (ms per frame)

| thread | busy | wait | untraced | in slices < 20 us | largest |
|---|---|---|---|---|---|
| queue worker 0x0 | 121.5 (89 %) | 7.3 (5 %) | 7.2 | 37.5 | Driver.Packet 128.8, Driver.EndSubmission 0.0 |
| draw committer | 22.6 (17 %) | 0.8 (1 %) | 112.6 | 3.4 | Graphics.Draw 21.6, Recorder.Sync 0.8 |
| queue worker 0x20 | 4.6 (3 %) | 130.1 (96 %) | 1.2 | 2.9 | Driver.Packet 134.6, Driver.EndSubmission 0.0 |
| presenter | 0.5 (0 %) | 0.0 (0 %) | 135.4 | 0.1 | VideoOut.Flip 0.5, Driver.Present 0.0 |
| gpu | 80.2 (59 %) | 0.0 (0 %) | 55.8 | 0.0 | batch 80.2 |

**Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 263.3, Driver.Packet.memory_wait 129.5, batch 80.2, Driver.Packet.dispatch 71.5, Driver.Dispatch 70.5, Vulkan.Dispatch 51.0, Vulkan.Dispatch.shader_resources 45.6, Resources.Complete 39.4, Driver.Packet.draw 38.1, Driver.Draw 37.9

**Longest waits**

- Driver.Packet.memory_wait (queue worker 0x20) 71.7 ms at 6886 ms, present 3376
- Driver.Packet.memory_wait (queue worker 0x20) 69.7 ms at 3482 ms, present 3351
- Driver.Packet.memory_wait (queue worker 0x20) 69.1 ms at 7159 ms, present 3378
- Driver.Packet.memory_wait (queue worker 0x20) 69.1 ms at 9197 ms, present 3393
- Driver.Packet.memory_wait (queue worker 0x20) 69.1 ms at 9058 ms, present 3392
- Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 8919 ms, present 3391
- Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 6210 ms, present 3371
- Driver.Packet.memory_wait (queue worker 0x20) 68.6 ms at 5109 ms, present 3363
- Driver.Packet.memory_wait (queue worker 0x20) 68.6 ms at 3895 ms, present 3354
- Driver.Packet.memory_wait (queue worker 0x20) 68.5 ms at 6750 ms, present 3375

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

- batch 4982: 21.2 ms at 8190 ms, present 3386: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.5, Recorder.Submit (draw committer) 0.0
- batch 2316: 20.3 ms at 3839 ms, present 3354: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.9, Graphics.Draw.draw_and_resource_release (draw committer) 1.7, Recorder.Submit (draw committer) 0.0
- batch 1992: 20.0 ms at 3293 ms, present 3350: GPU no ranges; recorded by Graphics.Draw (draw committer) 2.3, Graphics.Draw.draw_and_resource_release (draw committer) 2.0
- batch 455: 19.9 ms at 720 ms, present 3331: GPU no ranges; recorded by Graphics.Draw (draw committer) 2.5, Graphics.Draw.draw_and_resource_release (draw committer) 2.2
- batch 4316: 19.9 ms at 7105 ms, present 3378: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.5, Recorder.Submit (draw committer) 0.0
Summary records, last window of each timing run: RTX 3080 Ti (A1, B1, A2, B2)
{"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3962,"ms":10134.243},"interval_start_s":242.417,"interval_end_s":252.551,"presents":72,"frame_ms":{"p50":140.518,"p90":146.928,"p99":156.620,"max":156.620},"gpu_busy_ms_per_present":80.841,"worker_busy_pct":{"queue worker 0x0":99.402,"queue worker 0x20":99.970},"top_phases_ms_per_frame":{"Driver.Packet":280.542,"Driver.Packet.memory_wait":134.122,"Driver.Packet.dispatch":73.859,"Driver.Dispatch":72.787,"Vulkan.Dispatch":52.287,"Vulkan.Dispatch.shader_resources":47.653,"Driver.Packet.draw":40.164,"Driver.Draw":40.068},"trace_dropped":false,"trace":""}
{"commit":"cac7977ba098","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3971,"ms":10133.252},"interval_start_s":242.345,"interval_end_s":252.478,"presents":73,"frame_ms":{"p50":138.887,"p90":143.774,"p99":146.388,"max":146.388},"gpu_busy_ms_per_present":81.654,"worker_busy_pct":{"queue worker 0x0":99.385,"queue worker 0x20":99.984},"top_phases_ms_per_frame":{"Driver.Packet":276.667,"Driver.Packet.memory_wait":133.690,"Driver.Packet.dispatch":72.371,"Driver.Dispatch":71.307,"Vulkan.Dispatch":53.129,"Vulkan.Dispatch.shader_resources":48.503,"Resources.Complete":41.000,"Driver.Packet.draw":40.302},"trace_dropped":false,"trace":""}
{"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3951,"ms":10112.894},"interval_start_s":241.836,"interval_end_s":251.949,"presents":72,"frame_ms":{"p50":140.445,"p90":146.989,"p99":165.998,"max":165.998},"gpu_busy_ms_per_present":80.461,"worker_busy_pct":{"queue worker 0x0":99.405,"queue worker 0x20":99.883},"top_phases_ms_per_frame":{"Driver.Packet":279.817,"Driver.Packet.memory_wait":133.283,"Driver.Packet.dispatch":74.498,"Driver.Dispatch":73.400,"Vulkan.Dispatch":52.108,"Vulkan.Dispatch.shader_resources":47.485,"Driver.Packet.draw":39.664,"Driver.Draw":39.568},"trace_dropped":false,"trace":""}
{"commit":"cac7977ba098","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":4000,"ms":10077.310},"interval_start_s":241.869,"interval_end_s":251.947,"presents":74,"frame_ms":{"p50":135.922,"p90":140.599,"p99":144.917,"max":144.917},"gpu_busy_ms_per_present":80.251,"worker_busy_pct":{"queue worker 0x0":99.381,"queue worker 0x20":99.953},"top_phases_ms_per_frame":{"Driver.Packet":271.360,"Driver.Packet.memory_wait":130.932,"Driver.Packet.dispatch":71.508,"Driver.Dispatch":70.466,"Vulkan.Dispatch":52.308,"Vulkan.Dispatch.shader_resources":47.726,"Resources.Complete":40.459,"Driver.Packet.draw":39.632},"trace_dropped":false,"trace":""}
Summary records, last window of each timing run: Radeon 780M (A1, B1, A2, B2)
{"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3618,"ms":10264.890},"interval_start_s":419.174,"interval_end_s":429.439,"presents":33,"frame_ms":{"p50":313.142,"p90":322.330,"p99":333.609,"max":333.609},"gpu_busy_ms_per_present":221.519,"worker_busy_pct":{"queue worker 0x0":99.637,"queue worker 0x20":99.899},"top_phases_ms_per_frame":{"Driver.Packet":620.283,"Driver.Packet.memory_wait":313.952,"Driver.Packet.dispatch":189.773,"Driver.Dispatch":188.120,"Vulkan.Dispatch":149.658,"Vulkan.Dispatch.shader_resources":145.311,"Resources.Complete":130.408,"Recorder.Sync":115.584},"trace_dropped":false,"trace":""}
{"commit":"cac7977ba098","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3644,"ms":10027.138},"interval_start_s":421.374,"interval_end_s":431.401,"presents":33,"frame_ms":{"p50":303.927,"p90":312.172,"p99":329.510,"max":329.510},"gpu_busy_ms_per_present":218.826,"worker_busy_pct":{"queue worker 0x0":99.629,"queue worker 0x20":100.042},"top_phases_ms_per_frame":{"Driver.Packet":606.327,"Driver.Packet.memory_wait":304.797,"Driver.Packet.dispatch":189.156,"Driver.Dispatch":187.414,"Vulkan.Dispatch":152.767,"Vulkan.Dispatch.shader_resources":148.414,"Resources.Complete":135.260,"Recorder.Sync":116.373},"trace_dropped":false,"trace":""}
{"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3636,"ms":10291.397},"interval_start_s":422.186,"interval_end_s":432.477,"presents":33,"frame_ms":{"p50":314.828,"p90":322.538,"p99":324.467,"max":324.467},"gpu_busy_ms_per_present":221.785,"worker_busy_pct":{"queue worker 0x0":99.634,"queue worker 0x20":100.059},"top_phases_ms_per_frame":{"Driver.Packet":622.386,"Driver.Packet.memory_wait":311.203,"Driver.Packet.dispatch":194.921,"Driver.Dispatch":193.205,"Vulkan.Dispatch":154.374,"Vulkan.Dispatch.shader_resources":150.018,"Resources.Complete":135.699,"Recorder.Sync":116.088},"trace_dropped":false,"trace":""}
{"commit":"cac7977ba098","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3650,"ms":10278.403},"interval_start_s":418.442,"interval_end_s":428.721,"presents":34,"frame_ms":{"p50":304.242,"p90":308.429,"p99":311.215,"max":311.215},"gpu_busy_ms_per_present":217.439,"worker_busy_pct":{"queue worker 0x0":99.627,"queue worker 0x20":99.947},"top_phases_ms_per_frame":{"Driver.Packet":602.948,"Driver.Packet.memory_wait":300.261,"Driver.Packet.dispatch":190.008,"Driver.Dispatch":188.285,"Vulkan.Dispatch":153.378,"Vulkan.Dispatch.shader_resources":148.988,"Resources.Complete":137.041,"Recorder.Sync":119.947},"trace_dropped":false,"trace":""}

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 3080 Ti (NVIDIA 615.71.09, Ubuntu 26.10, Linux 7.3); AMD Radeon 780M (RADV Mesa 26.0.8, Ubuntu 26.04.1, Linux 7.0); the unit tests on the RTX 3080 Ti
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5156209972 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15783). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-11-04T14:44:10Z. --- ### What `PrepareDrawBindings` caps the read-only input snapshots of a draw at the draw snapshot budget (`APS5_DRAW_SNAPSHOT_MAX_MIB`, 64 MiB). An input over the budget is bound in place, not copied. A cached draw whose read-only inputs moved to another address reaches `PrepareDrawBindings` through `MovedReadOnlyBuffers`. Those moved inputs are snapshotted whatever their size, because the cap check skips inputs passed as moved. `MovedReadOnlyBuffers` now refuses a move when the moved inputs together exceed the budget. The draw then builds its resources, as it does for any other refused move, and binds those inputs in place under the existing rule. Moves within the budget are unchanged. **Why it matters.** In PPSA22408 (Hot Wheels Infinite Rush) and PPSA28416 (Star Wars Galactic Racer), both UE5, a 96 MiB and a 48 MiB storage buffer are bound read-only by draws at moving addresses. Compute passes write them earlier in the frame, so `MarkDirectWrites` stamps their whole range. Every reuse then refreshes the snapshot: `refreshDrawSnapshot` compares all of it on the draw committer while holding the GPU mutex, and only a few percent of it differs. With a temporary counter, that's about 6.2 GB compared per 10 s in the PPSA22408 garage (Radeon 780M) and about 14 GB in the PPSA28416 title screen (RTX 3080 Ti). The main queue worker waits for that mutex. **Changes:** - `ShaderResources.cpp`, `MovedReadOnlyBuffers`: a running total of the moved read-only inputs. The move is refused when the next input doesn't fit in `maxDrawSnapshotBytes`, the same per-resources budget `PrepareDrawBindings` applies. - `tests/Recorder.cpp`, `drawSnapshotCapTests` (the cap is 1 MiB there): - a moved input below the cap is still moved and snapshotted at its new address; - a moved 1 MiB + 4 KiB input is refused; - two moved 600 KiB inputs (1.2 MiB together) are refused. - `docs/dev/debt/libSceAgcDriver.md`: the draw input snapshot entry says that moved inputs obey the same budget. **Overlap:** #9897, #14032 and #14944 also touch `MovedReadOnlyBuffers`. #9897 and #14032 add a parameter, and #14944 calls it from a test. None of them touch the cap, so the overlap is textual only. #9897 and #14032 bound some inputs to the vertex or instance range a draw reads, which makes more moves fit the budget, so they complement this change. Their A/B on PPSA28416 didn't change these two buffers, which aren't indexed by vertex or instance. ### Tested **Unit test and controls**, RTX 3080 Ti (NVIDIA 615.71.09), Ubuntu 26.10 (Linux 7.3): - `agc_driver_recorder_tests --draw-snapshot-cap-only` passes on this head. - **Control 1:** with only the `ShaderResources.cpp` change removed, it fails at `a moved input exceeding the draw snapshot cap was moved and would be snapshotted`. - **Control 2:** with a per-input check (`bytes > maxDrawSnapshotBytes`) instead of the running total, it fails at `moved inputs exceeding the draw snapshot cap together were moved and would be snapshotted`. **Focused suites**: `agc_driver_recorder_tests` (whole suite and `--draw-snapshot-cap-only`) on `main` `b11c7bf84f` and on this head, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. Both sides pass, there are no `VUID-` messages on either side and no missing-layer line. `tools/check_conventions.py --base origin/main` passes. **PPSA22408 garage menu**, 3840x2160, the game's default settings, the same input route into the garage each run: - **Trees:** A = `main` `b11c7bf84f`. B = this head `cac7977ba0`, built from the same tree with only the driver rebuilt, so only `libSceAgcDriver.prx` differs. - **Run setup:** each runtime had one warm-up run first that isn't counted, and then the runs alternated A B A B. - **Env:** no `APS5_PROFILE_*`; the summary records below show each run's env. On the 780M the input route finds the screens from frame dumps, which are on for both A and B. - **Both sides:** both runtimes use the same `libSceHttp2.prx` from an earlier build. - **FPS:** presents per second over the last 12 summary windows in the garage. - **Errors:** no exceptions in any run. | | A run 1 | B run 1 | A run 2 | B run 2 | | |---|---|---|---|---|---| | RTX 3080 Ti, Ryzen 9 5950X, Linux 7.3 | 7.10 | 7.20 | 7.08 | 7.34 | **+2.6 %** | | Radeon 780M (RADV Mesa 26.0.8), Ryzen 9 PRO 8945HS, Linux 7.0 | 3.17 | 3.25 | 3.16 | 3.26 | **+3 %** | On the 3080 Ti the frame p50 goes from about 140.5 to 136–139 ms, and GPU busy per present stays at about 80.5 ms. **With `APS5_DRAW_SNAPSHOT_MAX_MIB=16` on both sides** (one run each, not a request to change the default): | | A | B | |---|---|---| | RTX 3080 Ti | 7.49 | 7.73 | | Radeon 780M | 3.37 | 3.47 | At 16 MiB the 48 MiB buffer leaves the snapshot path in A too, and this change removes the moved 96 MiB one as well. That's about +9 % over plain `main` on both GPUs, against +3 % from the change alone at the default budget. A lower default would bind more inputs in place, so it's a separate question. **Traces**, one per tree on the 3080 Ti: `APS5_TRACE_SECONDS=150:10 APS5_TRACE_EVENTS=2097152`, no other `APS5_TRACE_*` or `APS5_PROFILE_*`. Per frame, the draw committer's `Graphics.Draw` goes from 24.6 to 21.6 ms and the main queue worker's busy time from 125.2 to 121.5 ms. The game's output went to a file (headless run). Traces: [A](https://github.com/mrfelek/AnyPS5/releases/download/perf-moved-snapshot-cap-traces/aps5-trace-b11c7bf84f5d-1396560.json.gz) · [B](https://github.com/mrfelek/AnyPS5/releases/download/perf-moved-snapshot-cap-traces/aps5-trace-cac7977ba098-1403987.json.gz) <details><summary>trace_digest.py: A (main b11c7bf84f)</summary> ```` **seconds 150:10** from present 3312: 72 presents, frame p50 139.9 / p90 143.7 / p99 148.1 / max 148.1 ms, GPU busy 80.4 ms per present NVIDIA GeForce RTX 3080 Ti, NVIDIA 615.71.09, Linux 7.3.0-10-generic, 3840x2160, commit b11c7bf84f5d, dropped: no ```json {"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_EVENTS":"2097152","APS5_TRACE_SECONDS":"150:10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS\u2122\ufe0f Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 150:10","first_present":3312,"ms":10028.729},"presents":72,"frame_ms":{"p50":139.915,"p90":143.73,"p99":148.056,"max":148.056},"gpu_busy_ms_per_present":80.414,"worker_busy_pct":{"queue worker 0x0":99.401,"queue worker 0x20":99.285},"top_phases_ms_per_frame":{"Driver.Packet":276.658,"Driver.Packet.memory_wait":129.855,"Driver.Packet.dispatch":74.544,"Driver.Dispatch":73.481,"Vulkan.Dispatch":52.22,"Vulkan.Dispatch.shader_resources":47.629,"Resources.Complete":40.355,"Driver.Packet.draw":39.658},"trace_dropped":false,"trace":"aps5-trace-b11c7bf84f5d-1396560.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3365: 148.1 ms at 7391 ms: Driver.Packet (queue worker 0x20) 147.6, Driver.Packet (queue worker 0x0) 140.9, Driver.Packet.memory_wait (queue worker 0x20) 133.1, batch (gpu) 82.5 - present 3380: 146.8 ms at 9474 ms: Driver.Packet (queue worker 0x20) 146.3, Driver.Packet (queue worker 0x0) 139.8, Driver.Packet.memory_wait (queue worker 0x20) 132.3, batch (gpu) 81.7 - present 3333: 146.7 ms at 2925 ms: Driver.Packet (queue worker 0x20) 146.2, Driver.Packet (queue worker 0x0) 139.5, Driver.Packet.memory_wait (queue worker 0x20) 132.2, batch (gpu) 79.9 - present 3326: 144.9 ms at 1947 ms: Driver.Packet (queue worker 0x20) 144.4, Driver.Packet (queue worker 0x0) 137.8, Driver.Packet.memory_wait (queue worker 0x20) 132.6, batch (gpu) 81.9 - present 3372: 144.8 ms at 8373 ms: Driver.Packet (queue worker 0x20) 144.3, Driver.Packet (queue worker 0x0) 137.9, Driver.Packet.memory_wait (queue worker 0x20) 133.6, batch (gpu) 80.4 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 3365: 148.1 ms at 7391 ms, persistence 16.5 ms - present 3380: 146.8 ms at 9474 ms, persistence 15.2 ms - present 3333: 146.7 ms at 2925 ms, persistence 14.6 ms - present 3337: 144.8 ms at 3481 ms, persistence 12.2 ms - present 3372: 144.8 ms at 8373 ms, persistence 12.2 ms - present 3326: 144.9 ms at 1947 ms, persistence 11.1 ms - present 3318: 143.0 ms at 839 ms, persistence 10.9 ms - present 3349: 144.7 ms at 5154 ms, persistence 10.6 ms - present 3357: 143.3 ms at 6269 ms, persistence 9.2 ms - present 3341: 142.3 ms at 4042 ms, persistence 8.3 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 125.2 (90 %) | 7.0 (5 %) | 7.0 | 37.3 | Driver.Packet 132.2, Driver.EndSubmission 0.0 | | draw committer | 25.6 (18 %) | 0.9 (1 %) | 112.8 | 3.4 | Graphics.Draw 24.6, Recorder.Sync 0.8 | | queue worker 0x20 | 4.8 (3 %) | 133.3 (96 %) | 1.2 | 2.9 | Driver.Packet 137.9, Driver.EndSubmission 0.0 | | presenter | 0.5 (0 %) | 0.0 (0 %) | 138.7 | 0.1 | VideoOut.Flip 0.5, Driver.Present 0.0 | | gpu | 80.4 (58 %) | 0.0 (0 %) | 58.9 | 0.0 | batch 80.4 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 270.1, Driver.Packet.memory_wait 129.8, batch 80.4, Driver.Packet.dispatch 74.3, Driver.Dispatch 73.3, Vulkan.Dispatch 51.0, Vulkan.Dispatch.shader_resources 45.7, Resources.Complete 39.5, Driver.Packet.draw 38.9, Driver.Draw 38.7 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 70.6 ms at 7485 ms, present 3365 - Driver.Packet.memory_wait (queue worker 0x20) 69.5 ms at 511 ms, present 3315 - Driver.Packet.memory_wait (queue worker 0x20) 69.4 ms at 6360 ms, present 3357 - Driver.Packet.memory_wait (queue worker 0x20) 69.2 ms at 8460 ms, present 3372 - Driver.Packet.memory_wait (queue worker 0x20) 68.9 ms at 4125 ms, present 3341 - Driver.Packet.memory_wait (queue worker 0x20) 68.8 ms at 3014 ms, present 3333 - Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 3717 ms, present 3338 - Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 7910 ms, present 3368 - Driver.Packet.memory_wait (queue worker 0x20) 68.4 ms at 230 ms, present 3313 - Driver.Packet.memory_wait (queue worker 0x20) 68.4 ms at 3575 ms, present 3337 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2506: 20.1 ms at 4219 ms, present 3342: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.5, GpuMutex.wait.label (draw committer) 0.0 - batch 3492: 19.9 ms at 5887 ms, present 3354: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.9, Graphics.Draw.draw_and_resource_release (draw committer) 1.7 - batch 26: 19.7 ms at 37 ms, present 3312: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.4, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, Graphics.Draw.index_upload (draw committer) 0.1, GpuMutex.wait.draw (draw committer) 0.0 - batch 4397: 19.5 ms at 7429 ms, present 3365: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 1.2, GpuMutex.wait.draw (draw committer) 0.0 - batch 4632: 19.3 ms at 7853 ms, present 3368: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.5, Graphics.Draw.draw_and_resource_release (draw committer) 1.3 ```` </details> <details><summary>trace_digest.py: B (this head)</summary> ```` **seconds 150:10** from present 3326: 74 presents, frame p50 135.8 / p90 138.8 / p99 147.9 / max 147.9 ms, GPU busy 80.2 ms per present NVIDIA GeForce RTX 3080 Ti, NVIDIA 615.71.09, Linux 7.3.0-10-generic, 3840x2160, commit cac7977ba098, dropped: no ```json {"commit":"cac7977ba098","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_EVENTS":"2097152","APS5_TRACE_SECONDS":"150:10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS\u2122\ufe0f Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"seconds 150:10","first_present":3326,"ms":10060.974},"presents":74,"frame_ms":{"p50":135.848,"p90":138.811,"p99":147.909,"max":147.909},"gpu_busy_ms_per_present":80.175,"worker_busy_pct":{"queue worker 0x0":99.372,"queue worker 0x20":99.296},"top_phases_ms_per_frame":{"Driver.Packet":270.012,"Driver.Packet.memory_wait":129.55,"Driver.Packet.dispatch":71.771,"Driver.Dispatch":70.715,"Vulkan.Dispatch":52.243,"Vulkan.Dispatch.shader_resources":47.633,"Resources.Complete":40.307,"Driver.Packet.draw":38.992},"trace_dropped":false,"trace":"aps5-trace-cac7977ba098-1403987.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 3364: 147.9 ms at 5160 ms: Driver.Packet (queue worker 0x20) 147.4, Driver.Packet (queue worker 0x0) 140.7, Driver.Packet.memory_wait (queue worker 0x20) 140.3, batch (gpu) 81.1 - present 3328: 140.6 ms at 277 ms: Driver.Packet (queue worker 0x20) 140.1, Driver.Packet.memory_wait (queue worker 0x20) 133.2, Driver.Packet (queue worker 0x0) 132.9, batch (gpu) 80.2 - present 3392: 140.2 ms at 8971 ms: Driver.Packet (queue worker 0x20) 139.6, Driver.Packet (queue worker 0x0) 133.0, Driver.Packet.memory_wait (queue worker 0x20) 129.4, batch (gpu) 80.4 - present 3326: 139.7 ms at 0 ms: Driver.Packet (queue worker 0x0) 132.1, Driver.Packet (queue worker 0x20) 122.3, Driver.Packet.memory_wait (queue worker 0x20) 112.0, batch (gpu) 80.7 - present 3376: 139.4 ms at 6801 ms: Driver.Packet (queue worker 0x20) 139.0, Driver.Packet (queue worker 0x0) 132.4, Driver.Packet.memory_wait (queue worker 0x20) 130.5, batch (gpu) 80.6 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 3364: 147.9 ms at 5160 ms, persistence 16.5 ms - present 3328: 140.6 ms at 277 ms, persistence 9.2 ms - present 3392: 140.2 ms at 8971 ms, persistence 8.7 ms - present 3376: 139.4 ms at 6801 ms, persistence 6.8 ms - present 3352: 138.8 ms at 3535 ms, persistence 6.7 ms - present 3336: 139.0 ms at 1365 ms, persistence 6.6 ms - present 3340: 138.3 ms at 1908 ms, persistence 6.3 ms - present 3383: 138.2 ms at 7753 ms, persistence 5.7 ms - present 3338: 138.7 ms at 1637 ms, persistence 5.6 ms - present 3371: 139.0 ms at 6123 ms, persistence 5.6 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 121.5 (89 %) | 7.3 (5 %) | 7.2 | 37.5 | Driver.Packet 128.8, Driver.EndSubmission 0.0 | | draw committer | 22.6 (17 %) | 0.8 (1 %) | 112.6 | 3.4 | Graphics.Draw 21.6, Recorder.Sync 0.8 | | queue worker 0x20 | 4.6 (3 %) | 130.1 (96 %) | 1.2 | 2.9 | Driver.Packet 134.6, Driver.EndSubmission 0.0 | | presenter | 0.5 (0 %) | 0.0 (0 %) | 135.4 | 0.1 | VideoOut.Flip 0.5, Driver.Present 0.0 | | gpu | 80.2 (59 %) | 0.0 (0 %) | 55.8 | 0.0 | batch 80.2 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 263.3, Driver.Packet.memory_wait 129.5, batch 80.2, Driver.Packet.dispatch 71.5, Driver.Dispatch 70.5, Vulkan.Dispatch 51.0, Vulkan.Dispatch.shader_resources 45.6, Resources.Complete 39.4, Driver.Packet.draw 38.1, Driver.Draw 37.9 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x20) 71.7 ms at 6886 ms, present 3376 - Driver.Packet.memory_wait (queue worker 0x20) 69.7 ms at 3482 ms, present 3351 - Driver.Packet.memory_wait (queue worker 0x20) 69.1 ms at 7159 ms, present 3378 - Driver.Packet.memory_wait (queue worker 0x20) 69.1 ms at 9197 ms, present 3393 - Driver.Packet.memory_wait (queue worker 0x20) 69.1 ms at 9058 ms, present 3392 - Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 8919 ms, present 3391 - Driver.Packet.memory_wait (queue worker 0x20) 68.7 ms at 6210 ms, present 3371 - Driver.Packet.memory_wait (queue worker 0x20) 68.6 ms at 5109 ms, present 3363 - Driver.Packet.memory_wait (queue worker 0x20) 68.6 ms at 3895 ms, present 3354 - Driver.Packet.memory_wait (queue worker 0x20) 68.5 ms at 6750 ms, present 3375 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 4982: 21.2 ms at 8190 ms, present 3386: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.5, Recorder.Submit (draw committer) 0.0 - batch 2316: 20.3 ms at 3839 ms, present 3354: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.9, Graphics.Draw.draw_and_resource_release (draw committer) 1.7, Recorder.Submit (draw committer) 0.0 - batch 1992: 20.0 ms at 3293 ms, present 3350: GPU no ranges; recorded by Graphics.Draw (draw committer) 2.3, Graphics.Draw.draw_and_resource_release (draw committer) 2.0 - batch 455: 19.9 ms at 720 ms, present 3331: GPU no ranges; recorded by Graphics.Draw (draw committer) 2.5, Graphics.Draw.draw_and_resource_release (draw committer) 2.2 - batch 4316: 19.9 ms at 7105 ms, present 3378: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.7, Graphics.Draw.draw_and_resource_release (draw committer) 1.5, Recorder.Submit (draw committer) 0.0 ```` </details> <details><summary>Summary records, last window of each timing run: RTX 3080 Ti (A1, B1, A2, B2)</summary> ``` {"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3962,"ms":10134.243},"interval_start_s":242.417,"interval_end_s":252.551,"presents":72,"frame_ms":{"p50":140.518,"p90":146.928,"p99":156.620,"max":156.620},"gpu_busy_ms_per_present":80.841,"worker_busy_pct":{"queue worker 0x0":99.402,"queue worker 0x20":99.970},"top_phases_ms_per_frame":{"Driver.Packet":280.542,"Driver.Packet.memory_wait":134.122,"Driver.Packet.dispatch":73.859,"Driver.Dispatch":72.787,"Vulkan.Dispatch":52.287,"Vulkan.Dispatch.shader_resources":47.653,"Driver.Packet.draw":40.164,"Driver.Draw":40.068},"trace_dropped":false,"trace":""} {"commit":"cac7977ba098","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3971,"ms":10133.252},"interval_start_s":242.345,"interval_end_s":252.478,"presents":73,"frame_ms":{"p50":138.887,"p90":143.774,"p99":146.388,"max":146.388},"gpu_busy_ms_per_present":81.654,"worker_busy_pct":{"queue worker 0x0":99.385,"queue worker 0x20":99.984},"top_phases_ms_per_frame":{"Driver.Packet":276.667,"Driver.Packet.memory_wait":133.690,"Driver.Packet.dispatch":72.371,"Driver.Dispatch":71.307,"Vulkan.Dispatch":53.129,"Vulkan.Dispatch.shader_resources":48.503,"Resources.Complete":41.000,"Driver.Packet.draw":40.302},"trace_dropped":false,"trace":""} {"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3951,"ms":10112.894},"interval_start_s":241.836,"interval_end_s":251.949,"presents":72,"frame_ms":{"p50":140.445,"p90":146.989,"p99":165.998,"max":165.998},"gpu_busy_ms_per_present":80.461,"worker_busy_pct":{"queue worker 0x0":99.405,"queue worker 0x20":99.883},"top_phases_ms_per_frame":{"Driver.Packet":279.817,"Driver.Packet.memory_wait":133.283,"Driver.Packet.dispatch":74.498,"Driver.Dispatch":73.400,"Vulkan.Dispatch":52.108,"Vulkan.Dispatch.shader_resources":47.485,"Driver.Packet.draw":39.664,"Driver.Draw":39.568},"trace_dropped":false,"trace":""} {"commit":"cac7977ba098","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_STAGING_POOL_MIB":"768","APS5_TRACE_SUMMARY_EVERY":"10","APS5_UNIT_SHADOW_MIB":"512"},"gpu":"NVIDIA GeForce RTX 3080 Ti","driver":"NVIDIA 615.71.09","os":"Linux 7.3.0-10-generic","cpu":"AMD Ryzen 9 5950X 16-Core Processor","cpu_threads":32,"memory_mib":32003,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":4000,"ms":10077.310},"interval_start_s":241.869,"interval_end_s":251.947,"presents":74,"frame_ms":{"p50":135.922,"p90":140.599,"p99":144.917,"max":144.917},"gpu_busy_ms_per_present":80.251,"worker_busy_pct":{"queue worker 0x0":99.381,"queue worker 0x20":99.953},"top_phases_ms_per_frame":{"Driver.Packet":271.360,"Driver.Packet.memory_wait":130.932,"Driver.Packet.dispatch":71.508,"Driver.Dispatch":70.466,"Vulkan.Dispatch":52.308,"Vulkan.Dispatch.shader_resources":47.726,"Resources.Complete":40.459,"Driver.Packet.draw":39.632},"trace_dropped":false,"trace":""} ``` </details> <details><summary>Summary records, last window of each timing run: Radeon 780M (A1, B1, A2, B2)</summary> ``` {"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3618,"ms":10264.890},"interval_start_s":419.174,"interval_end_s":429.439,"presents":33,"frame_ms":{"p50":313.142,"p90":322.330,"p99":333.609,"max":333.609},"gpu_busy_ms_per_present":221.519,"worker_busy_pct":{"queue worker 0x0":99.637,"queue worker 0x20":99.899},"top_phases_ms_per_frame":{"Driver.Packet":620.283,"Driver.Packet.memory_wait":313.952,"Driver.Packet.dispatch":189.773,"Driver.Dispatch":188.120,"Vulkan.Dispatch":149.658,"Vulkan.Dispatch.shader_resources":145.311,"Resources.Complete":130.408,"Recorder.Sync":115.584},"trace_dropped":false,"trace":""} {"commit":"cac7977ba098","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3644,"ms":10027.138},"interval_start_s":421.374,"interval_end_s":431.401,"presents":33,"frame_ms":{"p50":303.927,"p90":312.172,"p99":329.510,"max":329.510},"gpu_busy_ms_per_present":218.826,"worker_busy_pct":{"queue worker 0x0":99.629,"queue worker 0x20":100.042},"top_phases_ms_per_frame":{"Driver.Packet":606.327,"Driver.Packet.memory_wait":304.797,"Driver.Packet.dispatch":189.156,"Driver.Dispatch":187.414,"Vulkan.Dispatch":152.767,"Vulkan.Dispatch.shader_resources":148.414,"Resources.Complete":135.260,"Recorder.Sync":116.373},"trace_dropped":false,"trace":""} {"commit":"b11c7bf84f5d","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3636,"ms":10291.397},"interval_start_s":422.186,"interval_end_s":432.477,"presents":33,"frame_ms":{"p50":314.828,"p90":322.538,"p99":324.467,"max":324.467},"gpu_busy_ms_per_present":221.785,"worker_busy_pct":{"queue worker 0x0":99.634,"queue worker 0x20":100.059},"top_phases_ms_per_frame":{"Driver.Packet":622.386,"Driver.Packet.memory_wait":311.203,"Driver.Packet.dispatch":194.921,"Driver.Dispatch":193.205,"Vulkan.Dispatch":154.374,"Vulkan.Dispatch.shader_resources":150.018,"Resources.Complete":135.699,"Recorder.Sync":116.088},"trace_dropped":false,"trace":""} {"commit":"cac7977ba098","dirty":false,"env":{"APS5_DUMP_FRAMES":"2000","APS5_DUMP_FRAMES_EVERY":"20","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"AMD Radeon 780M Graphics (RADV PHOENIX)","driver":"radv Mesa 26.0.8-1ubuntu0.3","os":"Linux 7.0.0-38-generic","cpu":"AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics","cpu_threads":16,"memory_mib":29852,"title_id":"PPSA22408","title":"HOT WHEELS™️ Infinite Rush","content_version":"01.000.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":3650,"ms":10278.403},"interval_start_s":418.442,"interval_end_s":428.721,"presents":34,"frame_ms":{"p50":304.242,"p90":308.429,"p99":311.215,"max":311.215},"gpu_busy_ms_per_present":217.439,"worker_busy_pct":{"queue worker 0x0":99.627,"queue worker 0x20":99.947},"top_phases_ms_per_frame":{"Driver.Packet":602.948,"Driver.Packet.memory_wait":300.261,"Driver.Packet.dispatch":190.008,"Driver.Dispatch":188.285,"Vulkan.Dispatch":153.378,"Vulkan.Dispatch.shader_resources":148.988,"Resources.Complete":137.041,"Recorder.Sync":119.947},"trace_dropped":false,"trace":""} ``` </details> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA RTX 3080 Ti (NVIDIA 615.71.09, Ubuntu 26.10, Linux 7.3); AMD Radeon 780M (RADV Mesa 26.0.8, Ubuntu 26.04.1, Linux 7.0); the unit tests on the RTX 3080 Ti - [x] AI-assisted: yes
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!15783
No description provided.