perf(agc): copy only the vertex records a draw fetches #9875

Merged
winstrex merged 32 commits from upstream-pr/9875 into main 2026-11-14 03:33:42 +00:00
winstrex commented 2026-10-22 20:14:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by winstrex on 2026-10-22T20:14:44Z.


What

A draw copies each vertex range it binds from the V# base address up to the last record it fetches, but it reads nothing below its lowest record. In Hades (PPSA03355) gameplay, 99 % of the draws are indexed with a nonzero vertex offset. Over 3 s, a draw copied 112 KiB of vertex data on average and read 0.78 KiB of it, about 1.9 GB/s of copies on the draw committer. The vertex buffers there are rewritten every few draws, so a kept snapshot doesn't help: no copy was reused.

Now a copy starts at the lowest record the draw fetches:

  • Per-vertex attributes start at (first vertex + lowest index) × stride. The index scan that finds the highest index now also returns the lowest one. Primitive restart indices count for neither, and kept index copies and kept index ranges store the lowest index too.
  • Per-instance attributes start at first instance × stride.
  • Zero-stride attributes, indirect draws and mesh draws still copy from the base. An indirect draw's counts are unknown when it is recorded, and a mesh draw binds no vertex buffers.

The buffer keeps the size and layout it has on main, so the binding offset, the vertex offset, the indices and gl_VertexIndex don't change. Only the bytes below the window are left unwritten. A kept vertex snapshot records where its valid bytes start:

  • A draw that reads from that start or higher reuses it.
  • A draw that reads from lower down, even entirely below that start, reads the missing bytes from the guest into the kept buffer. No draw that already used the buffer reads them. The kept start moves down by at least as many bytes as the buffer already holds, so a run of draws walking down one buffer reads it a logarithmic number of times, and never more bytes than the single copy main makes.

Writes are tracked over the whole range from the V# base address, as on main, so the bytes a draw doesn't read still decide whether its snapshot can be reused. Tracking only the window would be correct but slower: a write collect is memoized by the page its range starts on, and the windows of draws over one buffer start on many different pages.

APS5_POISON_VERTEX_PREFIX=1 fills the unwritten bytes with 0x7f, so a draw that read below its window would show in its frames. It is off by default.

drawInputReuseTests in tests/Recorder.cpp only ran when the recorder tests were started without arguments, which no ctest entry does. It is now registered as agc_draw_input_reuse, with the window cases added.

Overlap:

  • The branch carries a merge with main cf528e78c6 (3f43b8f92), for the conflict with #8756 below, the Mewgenics fix on top of it, and a merge with main 8ff4baf534 (a00390354) for a conflict with #6642 in the list of tests that CMakeLists.txt gives the libc path; the merge keeps both tests. #9712 is still open, and none of the #7895 series has changed these files since.
  • #9712 moves vertex copies into resizable BAR memory and changes the line in CopyDrawInput that creates the buffer. The two combine: a window copy writes fewer bytes into BAR. Whichever lands second keeps both.
  • #8756 landed first. It added an offset output to ReusableDrawSnapshot, so that a storage read can be served from a kept snapshot that contains it. The merge keeps both: offset stays where #8756 put it, after generation, so its callers don't change, and this PR's from and lowest follow it. The one vertex caller passes nullptr for offset. The two don't meet: the containing lookup only serves storage snapshots, and only a vertex snapshot can start past its address (ReusableDrawSnapshot and KeepDrawSnapshot require from to be 0 for any other use), so every storage snapshot it finds holds its whole range.
  • #12180 landed first. Its compaction path, for list draws with primitive restart on a device without VK_EXT_primitive_topology_list_restart, used HighestDrawIndex, which this PR replaces, and set the lowest index to 0. The merge with main 3a2b919816 (69b3cf6a4) adapts it to DrawIndexRange, so those draws also bound the window, from their lowest kept index. c0b700f66 tests it: APS5_NO_LIST_RESTART leaves the extension off, so agc_driver_list_restart_compacted takes that path on any GPU, with APS5_POISON_VERTEX_PREFIX set.
  • #13793 landed first. It keeps copies of draw inputs from memory nobody tracks (owned draw inputs) in the same snapshot table. A window copy leaves the bytes before its window unread, so the merge with main 67092e70b5 (59a1c9332c) stores the window and the lowest index with an owned entry too, and reuses it only for a draw that starts inside that window, as kept vertex snapshots already do. a409365521 tests it, and b442da8d6e makes the APS5_VERIFY_OWNED_DRAW_INPUTS check compare only the part the entry holds.
  • tools/pr_overlap.py also reports test registrations in CMakeLists.txt near those of #6182, #6185, #9565 and #9626.
  • The draw-side series in #7895 moves preparation off the committer. I described this change there (https://github.com/boykopovar/AnyPS5/issues/7895#issuecomment-6350322248): the window narrows what a prepared draw read, and filling in a kept snapshot is a record-time effect.

Mewgenics regression, fixed in 2a9cbce9e

@XatiX found that 3f43b8f92 dropped Mewgenics (PPSA37318) from 54–60 to 4–6 presents per second in its tutorial battle, with the vertex phase taking about 8 s of every 10 s on the draw committer, even while idle (report, scripted A/B with traces).

The cause: a kept window snapshot only served draws whose window ended past its start. Draws over one shared vertex buffer at falling lowest vertices, or at rising ones once the pool evicts, each kept their own snapshot, every one sized to the whole range from the buffer's address. Together they overflowed the 1 GiB draw input budget, so every draw copied again.

2a9cbce9e lets a kept snapshot serve those draws by filling it in downward, as described above, and tracks writes over the whole range again.

A local benchmark (not part of the PR) records 4096 draws of 4 vertices over one 512 KiB vertex buffer with a 32-byte stride. Each draw's range runs from the buffer's address to its last vertex. It measures the steady state, after three warm-up frames of the same draws, as µs per draw, the mean of 3 runs:

draws main 3f43b8f92 2a9cbce9e
lowest vertex rising 0.42 1.1 0.42
lowest vertex falling 0.13 80 0.13
one draw over the whole buffer, then rising windows 0.13 0.13 0.13
rising windows that all end at the last vertex 0.13 0.13 0.13
lowest vertex rising, CPU rewrites the buffer every frame 7.13 – 1.03
the other three, CPU rewrites the buffer every frame 0.14 – 0.13–0.14

At 3f43b8f92, the rising and falling cases copied 4094 and 4096 of the 4096 draws every frame.

vertexWindowSeriesTests in agc_draw_input_reuse covers this: 512 draws at falling vertices over one watched buffer must all get the guest's bytes from a single kept snapshot, and a later CPU store into it must not be served stale. The existing case for a read below a window now requires it to be filled into the kept snapshot. Both fail without the fix.

@XatiX repeated the scripted comparison at 2a9cbce9e, with the same route and machine as the report (Windows 11, RTX 5080, driver 617.42, 3840x2160), against the same base: main plus #11482, #7048 and a local libSceMouse change, 8b3d78400 (comment). Presents per 10 s, from tools/trace_digest.py:

interval base with this PR at 2a9cbce9e with this PR at 3f43b8f92 (earlier report)
80–90 s, battle's opening dialogue 590 600 63
90–100 s 563 580 39
100–110 s 538 588 49
120–180 s, on the battle board 78–83 101–109 –

Both runs rendered correctly and logged no errors. Both sides ran with APS5_PROFILE_DRAW=1 and frame dumps enabled, so these numbers confirm the fix but are not this PR's performance measurement.

Tested

Windows 11 (10.0.26300), NVIDIA GeForce RTX 5070 Ti, driver 621.01 (591.86 for the measurements marked as before the rebase), WinLibs GCC 15.2.0 r7, Release, with Overwolf's implicit Vulkan layers disabled.

  • Hades (PPSA03355), after the merge with main 67092e70b5: 533 presents in the 10 s window on main 67092e70b5 and 600 (the 60 FPS cap) with this PR at b442da8d6e. Frame p50 / p90 / p99 goes from 18.6 / 20.5 / 24.5 to 16.7 / 16.9 / 17.2 ms, and the committer's Graphics.Draw from 10.2 to 4.3 ms per frame. One APS5_TRACE_SECONDS=150:10 capture per side, APS5_TRACE_EVENTS=1048576, same machine, scene, scripted input and session, no APS5_PROFILE_*, log not redirected, no events dropped.

    hades-traces-main-67092e70b5.zip · hades-traces-pr-b442da8d6e.zip

    Summary lines and trace_digest
    {"commit":"67092e70b521","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8171,"ms":10005.106},"presents":533,"frame_ms":{"p50":18.560,"p90":20.475,"p99":24.546,"max":43.276},"gpu_busy_ms_per_present":1.287,"worker_busy_pct":{"queue worker 0x0":90.306},"top_phases_ms_per_frame":{"Driver.Packet":16.941,"Graphics.Draw":13.978,"Driver.Packet.draw":11.341,"Driver.Draw":11.171,"Graphics.Draw.draw_and_resource_release":5.963,"Driver.Draw.shader_compile_and_link":5.923,"Graphics.Draw.vertex_upload":5.292,"Shader.DrawStage":4.282},"owned_draw_counts":{"OwnedDraw.evicted_other":229241},"trace_dropped":false,"trace":"aps5-trace-67092e70b521-21404.json.gz"}
    {"commit":"b442da8d6efa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8937,"ms":10009.991},"presents":600,"frame_ms":{"p50":16.683,"p90":16.915,"p99":17.223,"max":19.818},"gpu_busy_ms_per_present":1.171,"worker_busy_pct":{"queue worker 0x0":92.971},"top_phases_ms_per_frame":{"VideoOut.Flip":16.339,"VideoOut.Flip.vblank_wait":15.812,"Driver.Packet":15.499,"Graphics.Draw":9.928,"Driver.Packet.draw":9.382,"Driver.Draw":9.237,"Driver.Draw.shader_compile_and_link":5.486,"Graphics.Draw.draw_and_resource_release":5.399},"owned_draw_counts":{"OwnedDraw.evicted_other":273081},"trace_dropped":false,"trace":"aps5-trace-b442da8d6efa-16644.json.gz"}
    

    main 67092e70b5:

    seconds 150:10 from present 8171: 533 presents, frame p50 18.6 / p90 20.5 / p99 24.5 / max 43.3 ms, GPU busy 1.3 ms per present
    NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit 67092e70b5, dropped: no

    {"commit":"67092e70b521","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8171,"ms":10005.106},"presents":533,"frame_ms":{"p50":18.56,"p90":20.475,"p99":24.546,"max":43.276},"gpu_busy_ms_per_present":1.287,"worker_busy_pct":{"queue worker 0x0":90.306},"top_phases_ms_per_frame":{"Driver.Packet":16.941,"Graphics.Draw":13.978,"Driver.Packet.draw":11.341,"Driver.Draw":11.171,"Graphics.Draw.draw_and_resource_release":5.963,"Driver.Draw.shader_compile_and_link":5.923,"Graphics.Draw.vertex_upload":5.292,"Shader.DrawStage":4.282},"owned_draw_counts":{"OwnedDraw.evicted_other":229241},"trace_dropped":false,"trace":"aps5-trace-67092e70b521-21404.json.gz"}
    

    Slowest frames (largest slices inside each, inclusive)

    • present 8547: 43.3 ms at 7050 ms: Graphics.Draw (draw committer) 21.8, Driver.Packet (queue worker 0x0) 21.3, Driver.Packet.draw (queue worker 0x0) 14.1, Driver.Draw (queue worker 0x0) 13.8
    • present 8653: 27.7 ms at 9004 ms: Graphics.Draw (draw committer) 14.2, Driver.Packet (queue worker 0x0) 13.9, Driver.Packet.draw (queue worker 0x0) 9.3, Driver.Draw (queue worker 0x0) 9.1
    • present 8665: 27.4 ms at 9249 ms: Driver.Packet (queue worker 0x0) 20.6, Graphics.Draw (draw committer) 20.3, Driver.Packet.draw (queue worker 0x0) 15.8, Driver.Draw (queue worker 0x0) 15.5
    • present 8684: 26.0 ms at 9627 ms: Driver.Packet (queue worker 0x0) 18.3, Graphics.Draw (draw committer) 17.5, Driver.Packet.draw (queue worker 0x0) 11.9, Driver.Draw (queue worker 0x0) 11.7
    • present 8279: 25.8 ms at 2068 ms: Driver.Packet (queue worker 0x0) 13.5, Graphics.Draw (draw committer) 12.5, Driver.Packet.draw (queue worker 0x0) 9.0, Driver.Draw (queue worker 0x0) 8.8

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

    • present 8547: 43.3 ms at 7050 ms, persistence 30.8 ms
    • present 8665: 27.4 ms at 9249 ms, persistence 14.9 ms
    • present 8279: 25.8 ms at 2068 ms, persistence 12.6 ms
    • present 8653: 27.7 ms at 9004 ms, persistence 12.4 ms
    • present 8200: 22.7 ms at 551 ms, persistence 9.0 ms
    • present 8684: 26.0 ms at 9627 ms, persistence 8.1 ms
    • present 8262: 24.5 ms at 1731 ms, persistence 6.5 ms
    • present 8426: 22.0 ms at 4777 ms, persistence 5.9 ms
    • present 8282: 21.4 ms at 2128 ms, persistence 5.3 ms
    • present 8659: 24.2 ms at 9121 ms, persistence 5.2 ms

    Threads (ms per frame)

    thread busy wait untraced in slices < 20 us largest
    queue worker 0x0 9.8 (52 %) 1.2 (6 %) 7.8 35.7 Driver.Packet 9.8, Driver.EndSubmission 0.0
    draw committer 10.8 (57 %) 0.0 (0 %) 8.0 14.2 Graphics.Draw 10.2, Recorder.Submit 0.5
    presenter 0.7 (4 %) 0.2 (1 %) 17.9 0.1 VideoOut.Flip 0.9, Driver.Present 0.0
    gpu 1.3 (7 %) 0.0 (0 %) 17.5 0.0 batch 1.3

    Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 10.2, Driver.Packet 9.8, Driver.Packet.draw 6.4, Driver.Draw 6.2, Graphics.Draw.draw_and_resource_release 2.3, Driver.Draw.draw_enqueued 1.5, batch 1.3, Driver.Packet.dispatch 1.3, Driver.WorkerWait 1.2, Graphics.Draw.vertex_upload 1.2

    Longest waits

    • VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 7109 ms, present 8549
    • VideoOut.Flip.vblank_wait (presenter) 14.4 ms at 7094 ms, present 8548
    • VideoOut.Flip.vblank_wait (presenter) 13.3 ms at 7129 ms, present 8550
    • VideoOut.Flip.vblank_wait (presenter) 12.0 ms at 7147 ms, present 8551
    • VideoOut.Flip.vblank_wait (presenter) 10.7 ms at 7165 ms, present 8552
    • VideoOut.Flip.vblank_wait (presenter) 7.3 ms at 7185 ms, present 8553
    • VideoOut.Flip.vblank_wait (presenter) 4.1 ms at 7205 ms, present 8554
    • VideoOut.Flip.vblank_wait (presenter) 2.2 ms at 9042 ms, present 8654
    • VideoOut.Flip.vblank_wait (presenter) 1.4 ms at 1068 ms, present 8227
    • Driver.WorkerWait (queue worker 0x0) 1.3 ms at 5305 ms, present 8455

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

    • batch 558: 0.9 ms at 725 ms, present 8208: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0, Graphics.Draw.vertex_upload (draw committer) 0.0
    • batch 3348: 0.8 ms at 4125 ms, present 8389: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.vertex_upload (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.1
    • batch 5809: 0.8 ms at 7123 ms, present 8549: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.vertex_upload (draw committer) 0.0, Recorder.Submit (draw committer) 0.0
    • batch 966: 0.7 ms at 1215 ms, present 8235: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.vertex_upload (draw committer) 0.2, Graphics.Draw.index_upload (draw committer) 0.1
    • batch 3894: 0.7 ms at 4793 ms, present 8426: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Graphics.Draw.vertex_upload (draw committer) 0.1, Recorder.Submit (draw committer) 0.0

    This PR, b442da8d6e:

    seconds 150:10 from present 8937: 600 presents, frame p50 16.7 / p90 16.9 / p99 17.2 / max 19.8 ms, GPU busy 1.2 ms per present
    NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit b442da8d6e, dropped: no

    {"commit":"b442da8d6efa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8937,"ms":10009.991},"presents":600,"frame_ms":{"p50":16.683,"p90":16.915,"p99":17.223,"max":19.818},"gpu_busy_ms_per_present":1.171,"worker_busy_pct":{"queue worker 0x0":92.971},"top_phases_ms_per_frame":{"VideoOut.Flip":16.339,"VideoOut.Flip.vblank_wait":15.812,"Driver.Packet":15.499,"Graphics.Draw":9.928,"Driver.Packet.draw":9.382,"Driver.Draw":9.237,"Driver.Draw.shader_compile_and_link":5.486,"Graphics.Draw.draw_and_resource_release":5.399},"owned_draw_counts":{"OwnedDraw.evicted_other":273081},"trace_dropped":false,"trace":"aps5-trace-b442da8d6efa-16644.json.gz"}
    

    Slowest frames (largest slices inside each, inclusive)

    • present 9233: 19.8 ms at 4939 ms: Driver.Packet (queue worker 0x0) 10.4, Driver.Packet.rendering_wait (queue worker 0x0) 6.5, Graphics.Draw (draw committer) 4.2, Driver.Packet.draw (queue worker 0x0) 2.9
    • present 9149: 17.7 ms at 3537 ms: VideoOut.Flip (presenter) 17.6, VideoOut.Flip.vblank_wait (presenter) 17.1, Driver.Packet (queue worker 0x0) 8.1, Graphics.Draw (draw committer) 4.6
    • present 9523: 17.4 ms at 9777 ms: VideoOut.Flip (presenter) 17.2, VideoOut.Flip.vblank_wait (presenter) 16.6, Driver.Packet (queue worker 0x0) 7.7, Graphics.Draw (draw committer) 4.7
    • present 9239: 17.4 ms at 5039 ms: VideoOut.Flip (presenter) 17.0, VideoOut.Flip.vblank_wait (presenter) 16.4, Driver.Packet (queue worker 0x0) 7.2, Graphics.Draw (draw committer) 4.6
    • present 9231: 17.3 ms at 4905 ms: VideoOut.Flip (presenter) 16.2, VideoOut.Flip.vblank_wait (presenter) 15.8, Driver.Packet (queue worker 0x0) 7.9, Graphics.Draw (draw committer) 4.7

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

    • present 9233: 19.8 ms at 4939 ms, persistence 6.4 ms
    • present 9523: 17.4 ms at 9777 ms, persistence 4.0 ms
    • present 9149: 17.7 ms at 3537 ms, persistence 1.7 ms
    • present 9239: 17.4 ms at 5039 ms, persistence 1.3 ms
    • present 9383: 17.2 ms at 7441 ms, persistence 1.0 ms
    • present 9509: 17.2 ms at 9543 ms, persistence 1.0 ms
    • present 9487: 17.2 ms at 9176 ms, persistence 1.0 ms
    • present 9010: 17.1 ms at 1218 ms, persistence 1.0 ms
    • present 9303: 17.1 ms at 6106 ms, persistence 0.9 ms
    • present 9226: 17.1 ms at 4821 ms, persistence 0.9 ms

    Threads (ms per frame)

    thread busy wait untraced in slices < 20 us largest
    queue worker 0x0 4.3 (26 %) 3.3 (20 %) 9.0 38.3 Driver.Packet 7.1, Driver.EndSubmission 0.0
    draw committer 4.7 (28 %) 0.0 (0 %) 12.0 13.6 Graphics.Draw 4.3, Recorder.Submit 0.4
    presenter 0.6 (3 %) 15.8 (95 %) 0.3 0.1 VideoOut.Flip 16.3, Driver.Present 0.0
    gpu 1.2 (7 %) 0.0 (0 %) 15.5 0.0 batch 1.2

    Largest slices (ms per frame, inclusive, all threads): VideoOut.Flip 16.3, VideoOut.Flip.vblank_wait 15.8, Driver.Packet 7.1, Graphics.Draw 4.3, Driver.Packet.draw 3.1, Driver.Draw 3.0, Driver.Packet.rendering_wait 2.8, Graphics.Draw.draw_and_resource_release 1.8, batch 1.2, Driver.Packet.dispatch 0.8

    Longest waits

    • VideoOut.Flip.vblank_wait (presenter) 17.1 ms at 3537 ms, present 9149
    • VideoOut.Flip.vblank_wait (presenter) 16.8 ms at 7441 ms, present 9383
    • VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 9777 ms, present 9523
    • VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 1218 ms, present 9010
    • VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 5990 ms, present 9296
    • VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 601 ms, present 8973
    • VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 117 ms, present 8944
    • VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 2653 ms, present 9096
    • VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 4822 ms, present 9226
    • VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 785 ms, present 8984

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

    • batch 4012: 0.7 ms at 5050 ms, present 9239: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
    • batch 394: 0.7 ms at 523 ms, present 8968: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Graphics.Draw.vertex_upload (draw committer) 0.0, Recorder.Submit (draw committer) 0.0
    • batch 7596: 0.6 ms at 9572 ms, present 9510: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
    • batch 3476: 0.6 ms at 4365 ms, present 9198: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0
    • batch 4388: 0.6 ms at 5517 ms, present 9267: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0
  • Hades (PPSA03355), gameplay, against main ed1e0ed08f: 51.8 FPS on main ed1e0ed08f and 59.2 FPS with this PR at 69aec25b3f, which is this branch merged with that same main. The committer's Graphics.Draw goes from 14.9 to 11.8 ms per frame. Captured as the Performance report form describes: one APS5_TRACE_SECONDS=150:4 capture per side, after one warm-up run of the scene and a restart of the title, on the same machine in the same session, with no other APS5_TRACE_* or APS5_PROFILE_* switch and the log not redirected (the title wrote to its own console). The only other APS5_* variable is APS5_PAD_INPUT_FILE, the scripted input, the same on both sides. No events were dropped, both builds are clean (dirty: false), NVIDIA driver 621.01.

    hades-form-main-ed1e0ed08.zip · hades-form-pr-69aec25b3.zip

    Against the main of the moment, 4bc9e779aa, the merge is clean:

    $ git merge-tree --write-tree 4bc9e779aa7abb2109c65ee3bca19e1b85df3be8 69aec25b3ffabed6af83e8bf305c2d245e74fccb
    571402ed73fe9874f9ad0b19edf8e20794f274ed
    
    Measurements
    main ed1e0ed08f this PR 69aec25b3f
    presents in the 4 s window 208 237
    frame p50 / p90 / p99 (ms) 19.3 / 20.9 / 22.4 16.7 / 17.7 / 19.8
    GPU busy per present (ms) 1.29 1.37
    committer Graphics.Draw per frame (ms, top_phases_ms_per_frame) 14.9 11.8

    aps5-summary.jsonl, main first:

    {"commit":"ed1e0ed08fc2","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":7617,"ms":4017.756},"presents":208,"frame_ms":{"p50":19.293,"p90":20.902,"p99":22.407,"max":28.234},"gpu_busy_ms_per_present":1.290,"worker_busy_pct":{"queue worker 0x0":89.888},"top_phases_ms_per_frame":{"Driver.Packet":17.354,"Graphics.Draw":14.873,"Driver.Packet.draw":12.436,"Driver.Draw":12.262,"Graphics.Draw.validate":7.717,"Driver.Draw.shader_compile_and_link":7.237,"Graphics.Draw.draw_and_resource_release":7.025,"Shader.DrawStage":5.606},"trace_dropped":false,"trace":"aps5-trace-ed1e0ed08fc2-55888.json.gz"}
    {"commit":"69aec25b3ffa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":8841,"ms":4003.872},"presents":237,"frame_ms":{"p50":16.715,"p90":17.723,"p99":19.763,"max":21.319},"gpu_busy_ms_per_present":1.368,"worker_busy_pct":{"queue worker 0x0":89.209},"top_phases_ms_per_frame":{"Driver.Packet":15.061,"Graphics.Draw":11.759,"Driver.Packet.draw":11.290,"Driver.Draw":11.131,"Driver.Draw.shader_compile_and_link":7.441,"VideoOut.Flip":7.307,"Graphics.Draw.draw_and_resource_release":7.027,"VideoOut.Flip.vblank_wait":6.703},"trace_dropped":false,"trace":"aps5-trace-69aec25b3ffa-51504.json.gz"}
    

    tools/trace_digest.py, main:

    **seconds 150:4** from present 7617: 208 presents, frame p50 19.3 / p90 20.9 / p99 22.4 / max 28.2 ms, GPU busy 1.3 ms per present
    NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit ed1e0ed08fc2, dropped: no
    
    ```json
    {"commit":"ed1e0ed08fc2","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":7617,"ms":4017.756},"presents":208,"frame_ms":{"p50":19.293,"p90":20.902,"p99":22.407,"max":28.234},"gpu_busy_ms_per_present":1.29,"worker_busy_pct":{"queue worker 0x0":89.888},"top_phases_ms_per_frame":{"Driver.Packet":17.354,"Graphics.Draw":14.873,"Driver.Packet.draw":12.436,"Driver.Draw":12.262,"Graphics.Draw.validate":7.717,"Driver.Draw.shader_compile_and_link":7.237,"Graphics.Draw.draw_and_resource_release":7.025,"Shader.DrawStage":5.606},"trace_dropped":false,"trace":"aps5-trace-ed1e0ed08fc2-55888.json.gz"}
    

    Slowest frames (largest slices inside each, inclusive)

    • present 7644: 28.2 ms at 538 ms: Driver.Packet (queue worker 0x0) 16.8, Graphics.Draw (draw committer) 16.2, Driver.Packet.draw (queue worker 0x0) 13.4, Driver.Draw (queue worker 0x0) 13.2
    • present 7746: 25.9 ms at 2501 ms: Driver.Packet (queue worker 0x0) 16.0, Graphics.Draw (draw committer) 15.7, Driver.Packet.draw (queue worker 0x0) 13.5, Driver.Draw (queue worker 0x0) 13.2
    • present 7771: 22.4 ms at 2958 ms: Driver.Packet (queue worker 0x0) 16.0, Graphics.Draw (draw committer) 15.9, Driver.Packet.draw (queue worker 0x0) 13.1, Driver.Draw (queue worker 0x0) 12.9
    • present 7791: 22.2 ms at 3341 ms: Driver.Packet (queue worker 0x0) 15.0, Graphics.Draw (draw committer) 14.6, Driver.Packet.draw (queue worker 0x0) 11.0, Driver.Draw (queue worker 0x0) 10.8
    • present 7617: 22.1 ms at 0 ms: Driver.Packet (queue worker 0x0) 14.6, Graphics.Draw (draw committer) 13.1, Driver.Packet.draw (queue worker 0x0) 11.4, Driver.Draw (queue worker 0x0) 11.2

    Threads (ms per frame)

    thread busy wait untraced in slices < 20 us largest
    queue worker 0x0 11.9 (62 %) 1.4 (7 %) 6.0 32.5 Driver.Packet 11.9, Driver.EndSubmission 0.0
    draw committer 12.6 (65 %) 0.0 (0 %) 6.7 11.7 Graphics.Draw 12.0, Recorder.Submit 0.5
    presenter 0.7 (4 %) 0.0 (0 %) 18.5 0.1 VideoOut.Flip 0.8, Driver.Present 0.0
    gpu 1.3 (7 %) 0.0 (0 %) 18.0 0.0 batch 1.3

    Largest slices (ms per frame, inclusive, all threads): Graphics.Draw 12.0, Driver.Packet 11.9, Driver.Packet.draw 9.0, Driver.Draw 8.7, Graphics.Draw.draw_and_resource_release 3.2, Graphics.Draw.validate 2.9, Driver.Draw.shader_compile_and_link 2.4, Driver.Draw.draw_enqueued 1.9, Driver.WorkerWait 1.4, Driver.WorkerWait.idle_and_completion_poll 1.3

    Longest waits

    • VideoOut.Flip.vblank_wait (presenter) 2.4 ms at 2539 ms, present 7747
    • Driver.WorkerWait (queue worker 0x0) 1.4 ms at 3657 ms, present 7806
    • Driver.WorkerWait (queue worker 0x0) 1.3 ms at 3977 ms, present 7822
    • Driver.WorkerWait (queue worker 0x0) 1.2 ms at 831 ms, present 7658
    • Driver.WorkerWait (queue worker 0x0) 1.1 ms at 2710 ms, present 7756
    • Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1540 ms, present 7695
    • Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1443 ms, present 7689
    • Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1739 ms, present 7705
    • Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1722 ms, present 7704
    • Driver.WorkerWait (queue worker 0x0) 0.9 ms at 912 ms, present 7662

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

    • batch 847: 0.5 ms at 1085 ms, present 7671: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
    • batch 234: 0.5 ms at 294 ms, present 7631: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
    • batch 667: 0.5 ms at 848 ms, present 7659: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Graphics.Draw.validate (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
    • batch 772: 0.5 ms at 988 ms, present 7666: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.0
    • batch 908: 0.5 ms at 1166 ms, present 7675: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.1
    
    `tools/trace_digest.py`, this PR:
    
    

    seconds 150:4 from present 8841: 237 presents, frame p50 16.7 / p90 17.7 / p99 19.8 / max 21.3 ms, GPU busy 1.4 ms per present
    NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit 69aec25b3f, dropped: no

    {"commit":"69aec25b3ffa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":8841,"ms":4003.872},"presents":237,"frame_ms":{"p50":16.715,"p90":17.723,"p99":19.763,"max":21.319},"gpu_busy_ms_per_present":1.368,"worker_busy_pct":{"queue worker 0x0":89.209},"top_phases_ms_per_frame":{"Driver.Packet":15.061,"Graphics.Draw":11.759,"Driver.Packet.draw":11.29,"Driver.Draw":11.131,"Driver.Draw.shader_compile_and_link":7.441,"VideoOut.Flip":7.307,"Graphics.Draw.draw_and_resource_release":7.027,"VideoOut.Flip.vblank_wait":6.703},"trace_dropped":false,"trace":"aps5-trace-69aec25b3ffa-51504.json.gz"}
    

    Slowest frames (largest slices inside each, inclusive)

    • present 8881: 21.3 ms at 680 ms: Driver.Packet (queue worker 0x0) 11.8, Driver.Packet.draw (queue worker 0x0) 10.3, Driver.Draw (queue worker 0x0) 10.0, Graphics.Draw (draw committer) 9.7
    • present 8918: 20.8 ms at 1313 ms: Driver.Packet (queue worker 0x0) 12.0, Driver.Packet.draw (queue worker 0x0) 10.8, Driver.Draw (queue worker 0x0) 10.5, Graphics.Draw (draw committer) 8.2
    • present 8880: 19.8 ms at 660 ms: Driver.Packet (queue worker 0x0) 12.3, Driver.Packet.draw (queue worker 0x0) 10.3, Driver.Draw (queue worker 0x0) 10.1, Graphics.Draw (draw committer) 8.7
    • present 8882: 19.5 ms at 701 ms: Driver.Packet (queue worker 0x0) 10.2, Driver.Packet.draw (queue worker 0x0) 8.7, Driver.Draw (queue worker 0x0) 8.5, Graphics.Draw (draw committer) 8.0
    • present 8925: 19.3 ms at 1435 ms: Driver.Packet (queue worker 0x0) 9.9, Graphics.Draw (draw committer) 8.1, Driver.Packet.draw (queue worker 0x0) 6.2, Driver.Draw (queue worker 0x0) 6.0

    Threads (ms per frame)

    thread busy wait untraced in slices < 20 us largest
    queue worker 0x0 7.5 (44 %) 1.6 (10 %) 7.8 37.9 Driver.Packet 7.9, Driver.EndSubmission 0.0
    draw committer 6.5 (39 %) 0.0 (0 %) 10.3 14.3 Graphics.Draw 6.0, Recorder.Submit 0.5
    presenter 0.7 (4 %) 6.7 (40 %) 9.5 0.1 VideoOut.Flip 7.3, Driver.Present 0.0
    gpu 1.4 (8 %) 0.0 (0 %) 15.5 0.0 batch 1.4

    Largest slices (ms per frame, inclusive, all threads): Driver.Packet 7.9, VideoOut.Flip 7.3, VideoOut.Flip.vblank_wait 6.7, Driver.Packet.draw 6.2, Graphics.Draw 6.0, Driver.Draw 6.0, Graphics.Draw.draw_and_resource_release 3.0, Driver.Draw.shader_compile_and_link 1.9, batch 1.4, Driver.WorkerWait 1.2

    Longest waits

    • VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 3787 ms, present 9065
    • VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 3204 ms, present 9030
    • VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 3120 ms, present 9025
    • VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 2603 ms, present 8994
    • VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 2820 ms, present 9007
    • VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 3938 ms, present 9074
    • VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 3521 ms, present 9049
    • VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 3871 ms, present 9070
    • VideoOut.Flip.vblank_wait (presenter) 16.1 ms at 2737 ms, present 9002
    • VideoOut.Flip.vblank_wait (presenter) 16.1 ms at 3671 ms, present 9058

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

    • batch 2020: 0.6 ms at 2286 ms, present 8974: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
    • batch 460: 0.5 ms at 502 ms, present 8870: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0
    • batch 1175: 0.5 ms at 1311 ms, present 8917: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1
    • batch 412: 0.5 ms at 448 ms, present 8867: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0, Recorder.Reap (draw committer) 0.0
    • batch 1222: 0.5 ms at 1365 ms, present 8920: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0
    
    </details>
    
    
  • Earlier Hades captures (superseded): all with APS5_TRACE_SECONDS=150:10 plus APS5_TRACE_EVENTS, APS5_TRACE_SUMMARY_EVERY and APS5_TRACE_DIR, and with the log redirected, which the form does not allow; the pair above replaces them.

    • main 1a217758a5 against 4a5a263920: 47.1 against 60.0 FPS, Graphics.Draw 16.3 against 11.3 ms. main · PR
    • main 7a225bb303 against 41c56ed22: 50.3 against 60.0 FPS, Graphics.Draw 15.2 against 11.2 ms. main · PR
    • main cf528e78c6 against 2a9cbce9e, with the Mewgenics fix: 45.4 against 53.9 FPS, Graphics.Draw 15.0 against 11.6 ms. main · PR
    • main 1da03c6f3 against f223f45c1, after the rebase, two captures per side: 34.3 and 33.6 against 37.1 and 37.0 FPS, Graphics.Draw 14.6–15.1 against 11.0–11.4 ms. main · PR
    • main 4d646b9e4 against 7c06af4af, before the rebase, two captures per side: 33.5–35.0 against 36.7–37.0 FPS, Graphics.Draw 14.3–15.1 against 11.0 ms. main · PR
  • The Pathless (PPSA01825) (measured before the rebase, on 4d646b9e4 against 7c06af4af): main menu, 96–98 presents per 10 s on main and 99–101 with this PR, over the last six 10 s intervals of one run per side. Vertex copies are a small part of its draws. On current main it stops after about 33 s with storing storage image results pending over memory outside the write watch without the guest bytes saved before them is not implemented (#7017), so both sides of this measurement have #7048 applied locally. That error wasn't investigated further.

  • LEGO Horizon Adventures (PPSA14632) (measured before the rebase, on 4d646b9e4 against 7c06af4af): loading after the graphics quality screen, 65–69 presents per 10 s on main and 72–73 with this PR (one run per side). Its vertex buffers are mostly static, so this also covers reusing and filling in kept window snapshots.

  • Frames, pixel by pixel (measured before the rebase, on 4d646b9e4 against 7c06af4af): five titles, two runs of main and one run of this PR with APS5_POISON_VERTEX_PREFIX=1, with frames dumped by APS5_DUMP_FRAMES at full resolution. The titles don't play out the same from run to run, so only the frames that are identical in both main runs can be compared. The poisoned run matches all of them in ANIMAL WELL (55) and The Pathless (24), and all but one in Hades (2 of 3) and LEGO Horizon Adventures (6 of 7). Balatro has none, because its background animates. The two that differ are a loading bar that is one column longer and a loading icon drawn a few frames earlier. The other frames show the same scenes at slightly different moments, with no stray geometry from the poisoned bytes.

    Frame comparison
    Title frames dumped identical in both main runs of those, identical in the poisoned run
    Hades (PPSA03355), boot to gameplay 150, every 30th 3 2 (loading bar one column longer)
    The Pathless (PPSA01825), boot to main menu, #7048 on both sides 73, every 30th 24 24
    Balatro (PPSA21402), menu to first hand 150, every 30th 0 –
    ANIMAL WELL (PPSA22520), title to first room 150, every 30th 55 55
    LEGO Horizon Adventures (PPSA14632), menu to loading 150, every 5th 7 6 (loading icon earlier)
  • Validation layer, after the rebase: the draw and VideoOut tests pass on main 1da03c6f3 (73) and on this PR f223f45c1 (76, the 3 new ones included), with no VUID- messages on either side. They ran with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, and neither log has was not found but was requested by env var VK_INSTANCE_LAYERS. Before the rebase the same set gave 70 and 73.

    Tests

    ctest -V -R with ^(agc_driver_graphics|agc_draw_.*|agc_recorder_.*|agc_driver_draw_.*|agc_vertex_.*|agc_embedded_vertex_fetch.*|agc_driver_.*vertex.*|agc_driver_pipelined_indirect_draw|agc_driver_queued_index_read_order|agc_driver_mesh_index_cache|agc_driver_.*provoking_vertex|guest_indexed_draw|agc_driver_flip.*|video_out_flip_.*)$.

  • New tests:

    • drawIndexRangeTests, vertexCopyStartTests and the ClampDrawIndices cases in tests/Graphics.cpp cover the window start: restart indices, the lowest index after clamping, interleaved attributes, per-instance attributes, zero stride and a start past the range.
    • agc_draw_input_reuse covers reusing, filling in and keeping window snapshots, and the lowest index of kept index copies and ranges.
    • DrawOffsetIndices draws with a lowest index of 3, a strip that starts with a restart index, and write-watched indices drawn twice, so the second draw takes its lowest index from the kept index copy. It also runs as agc_driver_draw_offset_indices_poisoned, and with indices bound in place as agc_driver_draw_offset_indices_poisoned_in_place. Since b3e5c7c585 its indices sit in a registered guest block; before, they were constants in the test image, which the allocation registry does not cover, so that variant copied them instead of binding them in place.
    • Mutation check, redone at 8ee49d287d: 26 changes to the new code. One, tracking writes over the whole range instead of the window, is now the code itself: the Mewgenics fix made it so, because tracking only the window turned out slower (see above). The other 25 were rebuilt one at a time and run against the tests above, at 8ee49d287d and, for the in-place index change, again at b3e5c7c585. 21 make a test fail. The other 4:
      • giving indirect draws a window, which is equivalent while their vertex offsets aren't negative;
      • dropping the lowest index after clamping, which no draw can observe. Indices are clamped only past the last record of every per-vertex attribute that reads zeros there, and each of those fetches is then copied whole with zero padding, without a window;
      • checking a kept vertex snapshot for stores from the start of the read instead of from the start of the kept window, in either of the two places that pick that start in ReusableDrawSnapshot. Both check more bytes than needed (the part below the kept window is read from the guest again anyway), so they can only drop a snapshot, never serve stale bytes;
  • After the merge with main 67092e70b5, with NVIDIA driver 621.01 and the Overwolf layers disabled: the AGC, VideoOut and shader set (-R "agc|video_out|shader") runs on main 67092e70b5 (1599) and on a409365521 (1603), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side and the layer loaded. agc_driver_quad_pixel_mask fails on both sides, and with APS5_DRAW_PIPELINE=1 so do agc_driver_draw_recapture_on_change, agc_driver_queued_constant_ram_dump and agc_driver_draw_unsupported_buffer_type_skip_refused. agc_owned_draw_inputs_verify failed on a409365521 only; b442da8d6e fixes it, and at b442da8d6e the owned and draw input tests pass under the layer with both settings. Full ctest suite at a409365521: 4793 of 4796 pass; vulkan_validation_gate_commands and agc_driver_quad_pixel_mask fail the same way on main, and the third is that agc_owned_draw_inputs_verify.

  • After the merge with main ed1e0ed08f, at 69aec25b3f, with NVIDIA driver 621.01: the draw set with agc_driver_list_restart.* passes on main ed1e0ed08f (108) and on this PR (112), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side. VK_LOADER_DEBUG=layer shows VK_LAYER_KHRONOS_validation inserted and no VK_LAYER_OW_* layer on both sides. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides as before. agc_driver_vertex_elected_atomic_max is skipped on both sides because this GPU runs vertex programs in subgroups.

  • After the merge with main 1a217758a5, at 4a5a263920, with NVIDIA driver 621.01: the draw set with agc_driver_list_restart.* passes on main 1a217758a5 (105) and on this PR (109), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side. VK_LOADER_DEBUG=layer shows VK_LAYER_KHRONOS_validation inserted and no VK_LAYER_OW_* layer on both sides. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides as before. agc_driver_vertex_elected_atomic_max, new in main, is skipped on both sides because this GPU runs vertex programs in subgroups.

  • After the merge with main 7a225bb303, at 41c56ed22, with NVIDIA driver 621.01: the draw set with agc_driver_list_restart.* passes on main (83) and on this PR (87), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side. VK_LOADER_DEBUG=layer shows VK_LAYER_KHRONOS_validation inserted and no VK_LAYER_OW_* layer on both sides. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides as before.

  • After the merge with main 3a2b919816, at c0b700f66, with NVIDIA driver 621.01: the draw set, now with agc_driver_list_restart.*, passes on main (83) and on this PR (87), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side and the layer loaded. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides as before. This GPU has VK_EXT_primitive_topology_list_restart, so only agc_driver_list_restart_compacted takes the compaction path. Its draw keeps indices 3 4 5 after a dropped 5 4. Taking the lowest index from the first kept-count indices before compaction (4), or adding 1 to it, makes it fail. Keeping 0, or taking the lowest of all indices before compaction, passes: both copy more, never less.

  • After the merge with main 8ff4baf534, at a00390354, with NVIDIA driver 621.01: the draw set (the one below without the agc_driver_flip and video_out_flip tests) passes on main (81) and on this PR (84), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side and the layer loaded. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides as before.

  • With the Mewgenics fix, at 2a9cbce9e, with NVIDIA driver 621.01, against main f55190f7e3:

    • Validation layer: the same draw and VideoOut set passes on main (98) and on this PR (101), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side and the layer loaded. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides as before.
    • The draw-input, index and vertex tests pass, vertexWindowSeriesTests included.
  • After the merge with main cf528e78c6, at 3f43b8f92, with NVIDIA driver 610.88:

    • Validation layer: a wider draw and VideoOut set (below) passes on main (98) and on this PR (101), with APS5_DRAW_PIPELINE unset and set, with no VUID- messages on either side and the layer loaded. With APS5_DRAW_PIPELINE=1, agc_driver_draw_unsupported_buffer_type_skip_refused fails on both sides with the same driver failure (buffer descriptor uses an unsupported type).

      Tests

      ctest -V -R with ^(agc_draw_.*|agc_driver_draw_.*|agc_driver_flip.*|agc_driver_graphics|.*vertex.*|agc_recorder_.*|agc_driver_mesh_.*|agc_driver_pipelined_indirect_draw|agc_driver_queued_index_read_order|guest_indexed_draw|video_out_flip_.*)$. #8756's containingSnapshotTests runs in agc_draw_snapshot_cap.

    • Full ctest suite with the GPU (--parallel 4 --timeout 120): 2280 of 2291 pass and 7 are skipped. The other 4 (log_macros, log_macros_timestamps, agc_host_import_cut_lifetime and agc_driver_depth_plane_partial_store) fail the same way on main cf528e78c6.

    • The measurements other than the Hades capture with the fix are from before the merge.

  • Full ctest suite before the merge, at f223f45c1 (--parallel 4 --timeout 120): 1894 of 1906 pass and 6 are skipped. The other 6 fail the same way on main 1da03c6f3: log_macros, log_macros_timestamps, agc_driver_sample_order, agc_driver_sample_order_grid_reference, agc_driver_sample_order_recipe_depth_locations and agc_driver_wave32_subgroup. Before the rebase, the fork's Windows CI passed on 7c06af4af (run 39838320780), but its runner has no Vulkan device and skips the GPU tests.

  • tools/check_conventions.py passes.

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; speeds up PPSA03355 (Hades) 45.4 → 53.9 FPS in gameplay
  • GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 621.01 (591.86 before the rebase), Windows 11 (10.0.26300). @BKlaasWerkman ran the draw-input, vertex and index tests on Windows 11 with an NVIDIA GeForce RTX 3060 Ti (617.42) and Intel Arc Graphics on Meteor Lake (101.9150), with the validation layer, on f223f45c1, the head before the last rebase, with the same commits (comment). Not run on AMD
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4973512492 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875). Originally posted by [winstrex](https://github.com/winstrex) on 2026-10-22T20:14:44Z. --- ### What A draw copies each vertex range it binds from the V# base address up to the last record it fetches, but it reads nothing below its lowest record. In Hades (PPSA03355) gameplay, 99 % of the draws are indexed with a nonzero vertex offset. Over 3 s, a draw copied 112 KiB of vertex data on average and read 0.78 KiB of it, about 1.9 GB/s of copies on the draw committer. The vertex buffers there are rewritten every few draws, so a kept snapshot doesn't help: no copy was reused. Now a copy starts at the lowest record the draw fetches: - Per-vertex attributes start at `(first vertex + lowest index) × stride`. The index scan that finds the highest index now also returns the lowest one. Primitive restart indices count for neither, and kept index copies and kept index ranges store the lowest index too. - Per-instance attributes start at `first instance × stride`. - Zero-stride attributes, indirect draws and mesh draws still copy from the base. An indirect draw's counts are unknown when it is recorded, and a mesh draw binds no vertex buffers. The buffer keeps the size and layout it has on `main`, so the binding offset, the vertex offset, the indices and `gl_VertexIndex` don't change. Only the bytes below the window are left unwritten. A kept vertex snapshot records where its valid bytes start: - A draw that reads from that start or higher reuses it. - A draw that reads from lower down, even entirely below that start, reads the missing bytes from the guest into the kept buffer. No draw that already used the buffer reads them. The kept start moves down by at least as many bytes as the buffer already holds, so a run of draws walking down one buffer reads it a logarithmic number of times, and never more bytes than the single copy `main` makes. Writes are tracked over the whole range from the V# base address, as on `main`, so the bytes a draw doesn't read still decide whether its snapshot can be reused. Tracking only the window would be correct but slower: a write collect is memoized by the page its range starts on, and the windows of draws over one buffer start on many different pages. `APS5_POISON_VERTEX_PREFIX=1` fills the unwritten bytes with `0x7f`, so a draw that read below its window would show in its frames. It is off by default. `drawInputReuseTests` in `tests/Recorder.cpp` only ran when the recorder tests were started without arguments, which no ctest entry does. It is now registered as `agc_draw_input_reuse`, with the window cases added. Overlap: - The branch carries a merge with `main` cf528e78c6 ([3f43b8f92](https://github.com/winstrex/AnyPS5/commit/3f43b8f9293f848a151e156d88481cc3fd1e8348)), for the conflict with #8756 below, the Mewgenics fix on top of it, and a merge with `main` 8ff4baf534 ([a00390354](https://github.com/winstrex/AnyPS5/commit/a00390354fdb13b7ce1e6bc3005b4a7b939729e6)) for a conflict with #6642 in the list of tests that `CMakeLists.txt` gives the `libc` path; the merge keeps both tests. #9712 is still open, and none of the #7895 series has changed these files since. - #9712 moves vertex copies into resizable BAR memory and changes the line in `CopyDrawInput` that creates the buffer. The two combine: a window copy writes fewer bytes into BAR. Whichever lands second keeps both. - #8756 landed first. It added an `offset` output to `ReusableDrawSnapshot`, so that a storage read can be served from a kept snapshot that contains it. The merge keeps both: `offset` stays where #8756 put it, after `generation`, so its callers don't change, and this PR's `from` and `lowest` follow it. The one vertex caller passes `nullptr` for `offset`. The two don't meet: the containing lookup only serves storage snapshots, and only a vertex snapshot can start past its address (`ReusableDrawSnapshot` and `KeepDrawSnapshot` require `from` to be 0 for any other use), so every storage snapshot it finds holds its whole range. - #12180 landed first. Its compaction path, for list draws with primitive restart on a device without `VK_EXT_primitive_topology_list_restart`, used `HighestDrawIndex`, which this PR replaces, and set the lowest index to 0. The merge with `main` 3a2b919816 ([69b3cf6a4](https://github.com/winstrex/AnyPS5/commit/69b3cf6a487f17e885872d02f373358d0b90ca27)) adapts it to `DrawIndexRange`, so those draws also bound the window, from their lowest kept index. [c0b700f66](https://github.com/winstrex/AnyPS5/commit/c0b700f66448fa43004de25e70f7dee5faa6e431) tests it: `APS5_NO_LIST_RESTART` leaves the extension off, so `agc_driver_list_restart_compacted` takes that path on any GPU, with `APS5_POISON_VERTEX_PREFIX` set. - #13793 landed first. It keeps copies of draw inputs from memory nobody tracks (owned draw inputs) in the same snapshot table. A window copy leaves the bytes before its window unread, so the merge with `main` 67092e70b5 (59a1c9332c) stores the window and the lowest index with an owned entry too, and reuses it only for a draw that starts inside that window, as kept vertex snapshots already do. a409365521 tests it, and b442da8d6e makes the `APS5_VERIFY_OWNED_DRAW_INPUTS` check compare only the part the entry holds. - `tools/pr_overlap.py` also reports test registrations in `CMakeLists.txt` near those of #6182, #6185, #9565 and #9626. - The draw-side series in #7895 moves preparation off the committer. I described this change there (https://github.com/boykopovar/AnyPS5/issues/7895#issuecomment-6350322248): the window narrows what a prepared draw read, and filling in a kept snapshot is a record-time effect. ### Mewgenics regression, fixed in [2a9cbce9e](https://github.com/winstrex/AnyPS5/commit/2a9cbce9ee4b31229410bef275fafb58931be1cf) @XatiX found that 3f43b8f92 dropped Mewgenics (PPSA37318) from 54–60 to 4–6 presents per second in its tutorial battle, with the vertex phase taking about 8 s of every 10 s on the draw committer, even while idle ([report](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6424135687), [scripted A/B with traces](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6425161853)). The cause: a kept window snapshot only served draws whose window ended past its start. Draws over one shared vertex buffer at falling lowest vertices, or at rising ones once the pool evicts, each kept their own snapshot, every one sized to the whole range from the buffer's address. Together they overflowed the 1 GiB draw input budget, so every draw copied again. [2a9cbce9e](https://github.com/winstrex/AnyPS5/commit/2a9cbce9ee4b31229410bef275fafb58931be1cf) lets a kept snapshot serve those draws by filling it in downward, as described above, and tracks writes over the whole range again. A local benchmark (not part of the PR) records 4096 draws of 4 vertices over one 512 KiB vertex buffer with a 32-byte stride. Each draw's range runs from the buffer's address to its last vertex. It measures the steady state, after three warm-up frames of the same draws, as µs per draw, the mean of 3 runs: | draws | `main` | 3f43b8f92 | 2a9cbce9e | |---|---|---|---| | lowest vertex rising | 0.42 | 1.1 | 0.42 | | lowest vertex falling | 0.13 | 80 | 0.13 | | one draw over the whole buffer, then rising windows | 0.13 | 0.13 | 0.13 | | rising windows that all end at the last vertex | 0.13 | 0.13 | 0.13 | | lowest vertex rising, CPU rewrites the buffer every frame | 7.13 | – | 1.03 | | the other three, CPU rewrites the buffer every frame | 0.14 | – | 0.13–0.14 | At 3f43b8f92, the rising and falling cases copied 4094 and 4096 of the 4096 draws every frame. `vertexWindowSeriesTests` in `agc_draw_input_reuse` covers this: 512 draws at falling vertices over one watched buffer must all get the guest's bytes from a single kept snapshot, and a later CPU store into it must not be served stale. The existing case for a read below a window now requires it to be filled into the kept snapshot. Both fail without the fix. @XatiX repeated the scripted comparison at 2a9cbce9e, with the same route and machine as the report (Windows 11, RTX 5080, driver 617.42, 3840x2160), against the same base: `main` plus #11482, #7048 and a local libSceMouse change, 8b3d78400 ([comment](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6441428483)). Presents per 10 s, from `tools/trace_digest.py`: | interval | base | with this PR at 2a9cbce9e | with this PR at 3f43b8f92 (earlier report) | |---|---|---|---| | 80–90 s, battle's opening dialogue | 590 | 600 | 63 | | 90–100 s | 563 | 580 | 39 | | 100–110 s | 538 | 588 | 49 | | 120–180 s, on the battle board | 78–83 | 101–109 | – | Both runs rendered correctly and logged no errors. Both sides ran with `APS5_PROFILE_DRAW=1` and frame dumps enabled, so these numbers confirm the fix but are not this PR's performance measurement. ### Tested Windows 11 (10.0.26300), NVIDIA GeForce RTX 5070 Ti, driver 621.01 (591.86 for the measurements marked as before the rebase), WinLibs GCC 15.2.0 r7, Release, with Overwolf's implicit Vulkan layers disabled. - **Hades (PPSA03355), after the merge with `main` 67092e70b5:** 533 presents in the 10 s window on `main` 67092e70b5 and 600 (the 60 FPS cap) with this PR at b442da8d6e. Frame p50 / p90 / p99 goes from 18.6 / 20.5 / 24.5 to 16.7 / 16.9 / 17.2 ms, and the committer's `Graphics.Draw` from 10.2 to 4.3 ms per frame. One `APS5_TRACE_SECONDS=150:10` capture per side, `APS5_TRACE_EVENTS=1048576`, same machine, scene, scripted input and session, no `APS5_PROFILE_*`, log not redirected, no events dropped. [hades-traces-main-67092e70b5.zip](https://github.com/user-attachments/files/34587785/hades-traces-main-67092e70b5.zip) · [hades-traces-pr-b442da8d6e.zip](https://github.com/user-attachments/files/34587787/hades-traces-pr-b442da8d6e.zip) <details><summary>Summary lines and trace_digest</summary> ```json {"commit":"67092e70b521","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8171,"ms":10005.106},"presents":533,"frame_ms":{"p50":18.560,"p90":20.475,"p99":24.546,"max":43.276},"gpu_busy_ms_per_present":1.287,"worker_busy_pct":{"queue worker 0x0":90.306},"top_phases_ms_per_frame":{"Driver.Packet":16.941,"Graphics.Draw":13.978,"Driver.Packet.draw":11.341,"Driver.Draw":11.171,"Graphics.Draw.draw_and_resource_release":5.963,"Driver.Draw.shader_compile_and_link":5.923,"Graphics.Draw.vertex_upload":5.292,"Shader.DrawStage":4.282},"owned_draw_counts":{"OwnedDraw.evicted_other":229241},"trace_dropped":false,"trace":"aps5-trace-67092e70b521-21404.json.gz"} {"commit":"b442da8d6efa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8937,"ms":10009.991},"presents":600,"frame_ms":{"p50":16.683,"p90":16.915,"p99":17.223,"max":19.818},"gpu_busy_ms_per_present":1.171,"worker_busy_pct":{"queue worker 0x0":92.971},"top_phases_ms_per_frame":{"VideoOut.Flip":16.339,"VideoOut.Flip.vblank_wait":15.812,"Driver.Packet":15.499,"Graphics.Draw":9.928,"Driver.Packet.draw":9.382,"Driver.Draw":9.237,"Driver.Draw.shader_compile_and_link":5.486,"Graphics.Draw.draw_and_resource_release":5.399},"owned_draw_counts":{"OwnedDraw.evicted_other":273081},"trace_dropped":false,"trace":"aps5-trace-b442da8d6efa-16644.json.gz"} ``` `main` 67092e70b5: **seconds 150:10** from present 8171: 533 presents, frame p50 18.6 / p90 20.5 / p99 24.5 / max 43.3 ms, GPU busy 1.3 ms per present NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit 67092e70b521, dropped: no ```json {"commit":"67092e70b521","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8171,"ms":10005.106},"presents":533,"frame_ms":{"p50":18.56,"p90":20.475,"p99":24.546,"max":43.276},"gpu_busy_ms_per_present":1.287,"worker_busy_pct":{"queue worker 0x0":90.306},"top_phases_ms_per_frame":{"Driver.Packet":16.941,"Graphics.Draw":13.978,"Driver.Packet.draw":11.341,"Driver.Draw":11.171,"Graphics.Draw.draw_and_resource_release":5.963,"Driver.Draw.shader_compile_and_link":5.923,"Graphics.Draw.vertex_upload":5.292,"Shader.DrawStage":4.282},"owned_draw_counts":{"OwnedDraw.evicted_other":229241},"trace_dropped":false,"trace":"aps5-trace-67092e70b521-21404.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 8547: 43.3 ms at 7050 ms: Graphics.Draw (draw committer) 21.8, Driver.Packet (queue worker 0x0) 21.3, Driver.Packet.draw (queue worker 0x0) 14.1, Driver.Draw (queue worker 0x0) 13.8 - present 8653: 27.7 ms at 9004 ms: Graphics.Draw (draw committer) 14.2, Driver.Packet (queue worker 0x0) 13.9, Driver.Packet.draw (queue worker 0x0) 9.3, Driver.Draw (queue worker 0x0) 9.1 - present 8665: 27.4 ms at 9249 ms: Driver.Packet (queue worker 0x0) 20.6, Graphics.Draw (draw committer) 20.3, Driver.Packet.draw (queue worker 0x0) 15.8, Driver.Draw (queue worker 0x0) 15.5 - present 8684: 26.0 ms at 9627 ms: Driver.Packet (queue worker 0x0) 18.3, Graphics.Draw (draw committer) 17.5, Driver.Packet.draw (queue worker 0x0) 11.9, Driver.Draw (queue worker 0x0) 11.7 - present 8279: 25.8 ms at 2068 ms: Driver.Packet (queue worker 0x0) 13.5, Graphics.Draw (draw committer) 12.5, Driver.Packet.draw (queue worker 0x0) 9.0, Driver.Draw (queue worker 0x0) 8.8 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 8547: 43.3 ms at 7050 ms, persistence 30.8 ms - present 8665: 27.4 ms at 9249 ms, persistence 14.9 ms - present 8279: 25.8 ms at 2068 ms, persistence 12.6 ms - present 8653: 27.7 ms at 9004 ms, persistence 12.4 ms - present 8200: 22.7 ms at 551 ms, persistence 9.0 ms - present 8684: 26.0 ms at 9627 ms, persistence 8.1 ms - present 8262: 24.5 ms at 1731 ms, persistence 6.5 ms - present 8426: 22.0 ms at 4777 ms, persistence 5.9 ms - present 8282: 21.4 ms at 2128 ms, persistence 5.3 ms - present 8659: 24.2 ms at 9121 ms, persistence 5.2 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 9.8 (52 %) | 1.2 (6 %) | 7.8 | 35.7 | Driver.Packet 9.8, Driver.EndSubmission 0.0 | | draw committer | 10.8 (57 %) | 0.0 (0 %) | 8.0 | 14.2 | Graphics.Draw 10.2, Recorder.Submit 0.5 | | presenter | 0.7 (4 %) | 0.2 (1 %) | 17.9 | 0.1 | VideoOut.Flip 0.9, Driver.Present 0.0 | | gpu | 1.3 (7 %) | 0.0 (0 %) | 17.5 | 0.0 | batch 1.3 | **Largest slices** (ms per frame, inclusive, all threads): Graphics.Draw 10.2, Driver.Packet 9.8, Driver.Packet.draw 6.4, Driver.Draw 6.2, Graphics.Draw.draw_and_resource_release 2.3, Driver.Draw.draw_enqueued 1.5, batch 1.3, Driver.Packet.dispatch 1.3, Driver.WorkerWait 1.2, Graphics.Draw.vertex_upload 1.2 **Longest waits** - VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 7109 ms, present 8549 - VideoOut.Flip.vblank_wait (presenter) 14.4 ms at 7094 ms, present 8548 - VideoOut.Flip.vblank_wait (presenter) 13.3 ms at 7129 ms, present 8550 - VideoOut.Flip.vblank_wait (presenter) 12.0 ms at 7147 ms, present 8551 - VideoOut.Flip.vblank_wait (presenter) 10.7 ms at 7165 ms, present 8552 - VideoOut.Flip.vblank_wait (presenter) 7.3 ms at 7185 ms, present 8553 - VideoOut.Flip.vblank_wait (presenter) 4.1 ms at 7205 ms, present 8554 - VideoOut.Flip.vblank_wait (presenter) 2.2 ms at 9042 ms, present 8654 - VideoOut.Flip.vblank_wait (presenter) 1.4 ms at 1068 ms, present 8227 - Driver.WorkerWait (queue worker 0x0) 1.3 ms at 5305 ms, present 8455 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 558: 0.9 ms at 725 ms, present 8208: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Recorder.Submit (draw committer) 0.0, Graphics.Draw.vertex_upload (draw committer) 0.0 - batch 3348: 0.8 ms at 4125 ms, present 8389: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.vertex_upload (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 - batch 5809: 0.8 ms at 7123 ms, present 8549: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.vertex_upload (draw committer) 0.0, Recorder.Submit (draw committer) 0.0 - batch 966: 0.7 ms at 1215 ms, present 8235: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.vertex_upload (draw committer) 0.2, Graphics.Draw.index_upload (draw committer) 0.1 - batch 3894: 0.7 ms at 4793 ms, present 8426: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Graphics.Draw.vertex_upload (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 This PR, b442da8d6e: **seconds 150:10** from present 8937: 600 presents, frame p50 16.7 / p90 16.9 / p99 17.2 / max 19.8 ms, GPU busy 1.2 ms per present NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit b442da8d6efa, dropped: no ```json {"commit":"b442da8d6efa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:10","first_present":8937,"ms":10009.991},"presents":600,"frame_ms":{"p50":16.683,"p90":16.915,"p99":17.223,"max":19.818},"gpu_busy_ms_per_present":1.171,"worker_busy_pct":{"queue worker 0x0":92.971},"top_phases_ms_per_frame":{"VideoOut.Flip":16.339,"VideoOut.Flip.vblank_wait":15.812,"Driver.Packet":15.499,"Graphics.Draw":9.928,"Driver.Packet.draw":9.382,"Driver.Draw":9.237,"Driver.Draw.shader_compile_and_link":5.486,"Graphics.Draw.draw_and_resource_release":5.399},"owned_draw_counts":{"OwnedDraw.evicted_other":273081},"trace_dropped":false,"trace":"aps5-trace-b442da8d6efa-16644.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 9233: 19.8 ms at 4939 ms: Driver.Packet (queue worker 0x0) 10.4, Driver.Packet.rendering_wait (queue worker 0x0) 6.5, Graphics.Draw (draw committer) 4.2, Driver.Packet.draw (queue worker 0x0) 2.9 - present 9149: 17.7 ms at 3537 ms: VideoOut.Flip (presenter) 17.6, VideoOut.Flip.vblank_wait (presenter) 17.1, Driver.Packet (queue worker 0x0) 8.1, Graphics.Draw (draw committer) 4.6 - present 9523: 17.4 ms at 9777 ms: VideoOut.Flip (presenter) 17.2, VideoOut.Flip.vblank_wait (presenter) 16.6, Driver.Packet (queue worker 0x0) 7.7, Graphics.Draw (draw committer) 4.7 - present 9239: 17.4 ms at 5039 ms: VideoOut.Flip (presenter) 17.0, VideoOut.Flip.vblank_wait (presenter) 16.4, Driver.Packet (queue worker 0x0) 7.2, Graphics.Draw (draw committer) 4.6 - present 9231: 17.3 ms at 4905 ms: VideoOut.Flip (presenter) 16.2, VideoOut.Flip.vblank_wait (presenter) 15.8, Driver.Packet (queue worker 0x0) 7.9, Graphics.Draw (draw committer) 4.7 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 9233: 19.8 ms at 4939 ms, persistence 6.4 ms - present 9523: 17.4 ms at 9777 ms, persistence 4.0 ms - present 9149: 17.7 ms at 3537 ms, persistence 1.7 ms - present 9239: 17.4 ms at 5039 ms, persistence 1.3 ms - present 9383: 17.2 ms at 7441 ms, persistence 1.0 ms - present 9509: 17.2 ms at 9543 ms, persistence 1.0 ms - present 9487: 17.2 ms at 9176 ms, persistence 1.0 ms - present 9010: 17.1 ms at 1218 ms, persistence 1.0 ms - present 9303: 17.1 ms at 6106 ms, persistence 0.9 ms - present 9226: 17.1 ms at 4821 ms, persistence 0.9 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 4.3 (26 %) | 3.3 (20 %) | 9.0 | 38.3 | Driver.Packet 7.1, Driver.EndSubmission 0.0 | | draw committer | 4.7 (28 %) | 0.0 (0 %) | 12.0 | 13.6 | Graphics.Draw 4.3, Recorder.Submit 0.4 | | presenter | 0.6 (3 %) | 15.8 (95 %) | 0.3 | 0.1 | VideoOut.Flip 16.3, Driver.Present 0.0 | | gpu | 1.2 (7 %) | 0.0 (0 %) | 15.5 | 0.0 | batch 1.2 | **Largest slices** (ms per frame, inclusive, all threads): VideoOut.Flip 16.3, VideoOut.Flip.vblank_wait 15.8, Driver.Packet 7.1, Graphics.Draw 4.3, Driver.Packet.draw 3.1, Driver.Draw 3.0, Driver.Packet.rendering_wait 2.8, Graphics.Draw.draw_and_resource_release 1.8, batch 1.2, Driver.Packet.dispatch 0.8 **Longest waits** - VideoOut.Flip.vblank_wait (presenter) 17.1 ms at 3537 ms, present 9149 - VideoOut.Flip.vblank_wait (presenter) 16.8 ms at 7441 ms, present 9383 - VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 9777 ms, present 9523 - VideoOut.Flip.vblank_wait (presenter) 16.6 ms at 1218 ms, present 9010 - VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 5990 ms, present 9296 - VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 601 ms, present 8973 - VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 117 ms, present 8944 - VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 2653 ms, present 9096 - VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 4822 ms, present 9226 - VideoOut.Flip.vblank_wait (presenter) 16.5 ms at 785 ms, present 8984 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 4012: 0.7 ms at 5050 ms, present 9239: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0 - batch 394: 0.7 ms at 523 ms, present 8968: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.2, Graphics.Draw.vertex_upload (draw committer) 0.0, Recorder.Submit (draw committer) 0.0 - batch 7596: 0.6 ms at 9572 ms, present 9510: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0 - batch 3476: 0.6 ms at 4365 ms, present 9198: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.index_upload (draw committer) 0.0 - batch 4388: 0.6 ms at 5517 ms, present 9267: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.4, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0 </details> - **Hades (PPSA03355), gameplay, against `main` ed1e0ed08f:** 51.8 FPS on `main` ed1e0ed08f and 59.2 FPS with this PR at 69aec25b3f, which is this branch merged with that same `main`. The committer's `Graphics.Draw` goes from 14.9 to 11.8 ms per frame. Captured as the Performance report form describes: one `APS5_TRACE_SECONDS=150:4` capture per side, after one warm-up run of the scene and a restart of the title, on the same machine in the same session, with no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch and the log not redirected (the title wrote to its own console). The only other `APS5_*` variable is `APS5_PAD_INPUT_FILE`, the scripted input, the same on both sides. No events were dropped, both builds are clean (`dirty: false`), NVIDIA driver 621.01. [hades-form-main-ed1e0ed08.zip](https://github.com/user-attachments/files/34196064/hades-form-main-ed1e0ed08.zip) · [hades-form-pr-69aec25b3.zip](https://github.com/user-attachments/files/34196065/hades-form-pr-69aec25b3.zip) Against the `main` of the moment, 4bc9e779aa, the merge is clean: ``` $ git merge-tree --write-tree 4bc9e779aa7abb2109c65ee3bca19e1b85df3be8 69aec25b3ffabed6af83e8bf305c2d245e74fccb 571402ed73fe9874f9ad0b19edf8e20794f274ed ``` <details><summary>Measurements</summary> | | `main` ed1e0ed08f | this PR 69aec25b3f | |---|---|---| | presents in the 4 s window | 208 | 237 | | frame p50 / p90 / p99 (ms) | 19.3 / 20.9 / 22.4 | 16.7 / 17.7 / 19.8 | | GPU busy per present (ms) | 1.29 | 1.37 | | committer `Graphics.Draw` per frame (ms, `top_phases_ms_per_frame`) | 14.9 | 11.8 | `aps5-summary.jsonl`, `main` first: ```json {"commit":"ed1e0ed08fc2","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":7617,"ms":4017.756},"presents":208,"frame_ms":{"p50":19.293,"p90":20.902,"p99":22.407,"max":28.234},"gpu_busy_ms_per_present":1.290,"worker_busy_pct":{"queue worker 0x0":89.888},"top_phases_ms_per_frame":{"Driver.Packet":17.354,"Graphics.Draw":14.873,"Driver.Packet.draw":12.436,"Driver.Draw":12.262,"Graphics.Draw.validate":7.717,"Driver.Draw.shader_compile_and_link":7.237,"Graphics.Draw.draw_and_resource_release":7.025,"Shader.DrawStage":5.606},"trace_dropped":false,"trace":"aps5-trace-ed1e0ed08fc2-55888.json.gz"} {"commit":"69aec25b3ffa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":8841,"ms":4003.872},"presents":237,"frame_ms":{"p50":16.715,"p90":17.723,"p99":19.763,"max":21.319},"gpu_busy_ms_per_present":1.368,"worker_busy_pct":{"queue worker 0x0":89.209},"top_phases_ms_per_frame":{"Driver.Packet":15.061,"Graphics.Draw":11.759,"Driver.Packet.draw":11.290,"Driver.Draw":11.131,"Driver.Draw.shader_compile_and_link":7.441,"VideoOut.Flip":7.307,"Graphics.Draw.draw_and_resource_release":7.027,"VideoOut.Flip.vblank_wait":6.703},"trace_dropped":false,"trace":"aps5-trace-69aec25b3ffa-51504.json.gz"} ``` `tools/trace_digest.py`, `main`: ``` **seconds 150:4** from present 7617: 208 presents, frame p50 19.3 / p90 20.9 / p99 22.4 / max 28.2 ms, GPU busy 1.3 ms per present NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit ed1e0ed08fc2, dropped: no ```json {"commit":"ed1e0ed08fc2","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":7617,"ms":4017.756},"presents":208,"frame_ms":{"p50":19.293,"p90":20.902,"p99":22.407,"max":28.234},"gpu_busy_ms_per_present":1.29,"worker_busy_pct":{"queue worker 0x0":89.888},"top_phases_ms_per_frame":{"Driver.Packet":17.354,"Graphics.Draw":14.873,"Driver.Packet.draw":12.436,"Driver.Draw":12.262,"Graphics.Draw.validate":7.717,"Driver.Draw.shader_compile_and_link":7.237,"Graphics.Draw.draw_and_resource_release":7.025,"Shader.DrawStage":5.606},"trace_dropped":false,"trace":"aps5-trace-ed1e0ed08fc2-55888.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 7644: 28.2 ms at 538 ms: Driver.Packet (queue worker 0x0) 16.8, Graphics.Draw (draw committer) 16.2, Driver.Packet.draw (queue worker 0x0) 13.4, Driver.Draw (queue worker 0x0) 13.2 - present 7746: 25.9 ms at 2501 ms: Driver.Packet (queue worker 0x0) 16.0, Graphics.Draw (draw committer) 15.7, Driver.Packet.draw (queue worker 0x0) 13.5, Driver.Draw (queue worker 0x0) 13.2 - present 7771: 22.4 ms at 2958 ms: Driver.Packet (queue worker 0x0) 16.0, Graphics.Draw (draw committer) 15.9, Driver.Packet.draw (queue worker 0x0) 13.1, Driver.Draw (queue worker 0x0) 12.9 - present 7791: 22.2 ms at 3341 ms: Driver.Packet (queue worker 0x0) 15.0, Graphics.Draw (draw committer) 14.6, Driver.Packet.draw (queue worker 0x0) 11.0, Driver.Draw (queue worker 0x0) 10.8 - present 7617: 22.1 ms at 0 ms: Driver.Packet (queue worker 0x0) 14.6, Graphics.Draw (draw committer) 13.1, Driver.Packet.draw (queue worker 0x0) 11.4, Driver.Draw (queue worker 0x0) 11.2 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 11.9 (62 %) | 1.4 (7 %) | 6.0 | 32.5 | Driver.Packet 11.9, Driver.EndSubmission 0.0 | | draw committer | 12.6 (65 %) | 0.0 (0 %) | 6.7 | 11.7 | Graphics.Draw 12.0, Recorder.Submit 0.5 | | presenter | 0.7 (4 %) | 0.0 (0 %) | 18.5 | 0.1 | VideoOut.Flip 0.8, Driver.Present 0.0 | | gpu | 1.3 (7 %) | 0.0 (0 %) | 18.0 | 0.0 | batch 1.3 | **Largest slices** (ms per frame, inclusive, all threads): Graphics.Draw 12.0, Driver.Packet 11.9, Driver.Packet.draw 9.0, Driver.Draw 8.7, Graphics.Draw.draw_and_resource_release 3.2, Graphics.Draw.validate 2.9, Driver.Draw.shader_compile_and_link 2.4, Driver.Draw.draw_enqueued 1.9, Driver.WorkerWait 1.4, Driver.WorkerWait.idle_and_completion_poll 1.3 **Longest waits** - VideoOut.Flip.vblank_wait (presenter) 2.4 ms at 2539 ms, present 7747 - Driver.WorkerWait (queue worker 0x0) 1.4 ms at 3657 ms, present 7806 - Driver.WorkerWait (queue worker 0x0) 1.3 ms at 3977 ms, present 7822 - Driver.WorkerWait (queue worker 0x0) 1.2 ms at 831 ms, present 7658 - Driver.WorkerWait (queue worker 0x0) 1.1 ms at 2710 ms, present 7756 - Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1540 ms, present 7695 - Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1443 ms, present 7689 - Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1739 ms, present 7705 - Driver.WorkerWait (queue worker 0x0) 1.0 ms at 1722 ms, present 7704 - Driver.WorkerWait (queue worker 0x0) 0.9 ms at 912 ms, present 7662 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 847: 0.5 ms at 1085 ms, present 7671: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.3, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.0 - batch 234: 0.5 ms at 294 ms, present 7631: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.0, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.0 - batch 667: 0.5 ms at 848 ms, present 7659: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.2, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Graphics.Draw.validate (draw committer) 0.4, Recorder.Submit (draw committer) 0.0 - batch 772: 0.5 ms at 988 ms, present 7666: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.0 - batch 908: 0.5 ms at 1166 ms, present 7675: GPU no ranges; recorded by Graphics.Draw (draw committer) 1.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Graphics.Draw.validate (draw committer) 0.2, Recorder.Submit (draw committer) 0.1 ``` `tools/trace_digest.py`, this PR: ``` **seconds 150:4** from present 8841: 237 presents, frame p50 16.7 / p90 17.7 / p99 19.8 / max 21.3 ms, GPU busy 1.4 ms per present NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit 69aec25b3ffa, dropped: no ```json {"commit":"69aec25b3ffa","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_SECONDS":"150:4"},"gpu":"NVIDIA GeForce RTX 5070 Ti","driver":"NVIDIA 621.01","os":"Windows 10.0.26300","cpu":"Genuine Intel(R) 0000","cpu_threads":24,"memory_mib":32509,"title_id":"PPSA03355","title":"Hades","content_version":"01.003.000","resolution":"1920x1080","window":{"spec":"seconds 150:4","first_present":8841,"ms":4003.872},"presents":237,"frame_ms":{"p50":16.715,"p90":17.723,"p99":19.763,"max":21.319},"gpu_busy_ms_per_present":1.368,"worker_busy_pct":{"queue worker 0x0":89.209},"top_phases_ms_per_frame":{"Driver.Packet":15.061,"Graphics.Draw":11.759,"Driver.Packet.draw":11.29,"Driver.Draw":11.131,"Driver.Draw.shader_compile_and_link":7.441,"VideoOut.Flip":7.307,"Graphics.Draw.draw_and_resource_release":7.027,"VideoOut.Flip.vblank_wait":6.703},"trace_dropped":false,"trace":"aps5-trace-69aec25b3ffa-51504.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 8881: 21.3 ms at 680 ms: Driver.Packet (queue worker 0x0) 11.8, Driver.Packet.draw (queue worker 0x0) 10.3, Driver.Draw (queue worker 0x0) 10.0, Graphics.Draw (draw committer) 9.7 - present 8918: 20.8 ms at 1313 ms: Driver.Packet (queue worker 0x0) 12.0, Driver.Packet.draw (queue worker 0x0) 10.8, Driver.Draw (queue worker 0x0) 10.5, Graphics.Draw (draw committer) 8.2 - present 8880: 19.8 ms at 660 ms: Driver.Packet (queue worker 0x0) 12.3, Driver.Packet.draw (queue worker 0x0) 10.3, Driver.Draw (queue worker 0x0) 10.1, Graphics.Draw (draw committer) 8.7 - present 8882: 19.5 ms at 701 ms: Driver.Packet (queue worker 0x0) 10.2, Driver.Packet.draw (queue worker 0x0) 8.7, Driver.Draw (queue worker 0x0) 8.5, Graphics.Draw (draw committer) 8.0 - present 8925: 19.3 ms at 1435 ms: Driver.Packet (queue worker 0x0) 9.9, Graphics.Draw (draw committer) 8.1, Driver.Packet.draw (queue worker 0x0) 6.2, Driver.Draw (queue worker 0x0) 6.0 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 7.5 (44 %) | 1.6 (10 %) | 7.8 | 37.9 | Driver.Packet 7.9, Driver.EndSubmission 0.0 | | draw committer | 6.5 (39 %) | 0.0 (0 %) | 10.3 | 14.3 | Graphics.Draw 6.0, Recorder.Submit 0.5 | | presenter | 0.7 (4 %) | 6.7 (40 %) | 9.5 | 0.1 | VideoOut.Flip 7.3, Driver.Present 0.0 | | gpu | 1.4 (8 %) | 0.0 (0 %) | 15.5 | 0.0 | batch 1.4 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 7.9, VideoOut.Flip 7.3, VideoOut.Flip.vblank_wait 6.7, Driver.Packet.draw 6.2, Graphics.Draw 6.0, Driver.Draw 6.0, Graphics.Draw.draw_and_resource_release 3.0, Driver.Draw.shader_compile_and_link 1.9, batch 1.4, Driver.WorkerWait 1.2 **Longest waits** - VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 3787 ms, present 9065 - VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 3204 ms, present 9030 - VideoOut.Flip.vblank_wait (presenter) 16.3 ms at 3120 ms, present 9025 - VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 2603 ms, present 8994 - VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 2820 ms, present 9007 - VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 3938 ms, present 9074 - VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 3521 ms, present 9049 - VideoOut.Flip.vblank_wait (presenter) 16.2 ms at 3871 ms, present 9070 - VideoOut.Flip.vblank_wait (presenter) 16.1 ms at 2737 ms, present 9002 - VideoOut.Flip.vblank_wait (presenter) 16.1 ms at 3671 ms, present 9058 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2020: 0.6 ms at 2286 ms, present 8974: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0 - batch 460: 0.5 ms at 502 ms, present 8870: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.0 - batch 1175: 0.5 ms at 1311 ms, present 8917: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1 - batch 412: 0.5 ms at 448 ms, present 8867: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0, Recorder.Reap (draw committer) 0.0 - batch 1222: 0.5 ms at 1365 ms, present 8920: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0 ``` </details> - **Earlier Hades captures (superseded):** all with `APS5_TRACE_SECONDS=150:10` plus `APS5_TRACE_EVENTS`, `APS5_TRACE_SUMMARY_EVERY` and `APS5_TRACE_DIR`, and with the log redirected, which the form does not allow; the pair above replaces them. - `main` 1a217758a5 against 4a5a263920: 47.1 against 60.0 FPS, `Graphics.Draw` 16.3 against 11.3 ms. [main](https://github.com/user-attachments/files/34164648/hades-traces-main-1a217758a.zip) · [PR](https://github.com/user-attachments/files/34164649/hades-traces-pr-4a5a26392.zip) - `main` 7a225bb303 against 41c56ed22: 50.3 against 60.0 FPS, `Graphics.Draw` 15.2 against 11.2 ms. [main](https://github.com/user-attachments/files/34158794/hades-traces-main-7a225bb30.zip) · [PR](https://github.com/user-attachments/files/34158795/hades-traces-pr-41c56ed22.zip) - `main` cf528e78c6 against 2a9cbce9e, with the Mewgenics fix: 45.4 against 53.9 FPS, `Graphics.Draw` 15.0 against 11.6 ms. [main](https://github.com/user-attachments/files/33993937/hades-traces-main-cf528e78c.zip) · [PR](https://github.com/user-attachments/files/33993938/hades-traces-pr-2a9cbce9e.zip) - `main` 1da03c6f3 against f223f45c1, after the rebase, two captures per side: 34.3 and 33.6 against 37.1 and 37.0 FPS, `Graphics.Draw` 14.6–15.1 against 11.0–11.4 ms. [main](https://github.com/user-attachments/files/33845316/hades-traces-main-1da03c6f3.zip) · [PR](https://github.com/user-attachments/files/33845317/hades-traces-pr-f223f45c1.zip) - `main` 4d646b9e4 against 7c06af4af, before the rebase, two captures per side: 33.5–35.0 against 36.7–37.0 FPS, `Graphics.Draw` 14.3–15.1 against 11.0 ms. [main](https://github.com/user-attachments/files/33843460/hades-traces-main-4d646b9e4.zip) · [PR](https://github.com/user-attachments/files/33843466/hades-traces-pr-7c06af4af.zip) - **The Pathless (PPSA01825) (measured before the rebase, on 4d646b9e4 against 7c06af4af):** main menu, 96–98 presents per 10 s on `main` and 99–101 with this PR, over the last six 10 s intervals of one run per side. Vertex copies are a small part of its draws. On current `main` it stops after about 33 s with `storing storage image results pending over memory outside the write watch without the guest bytes saved before them is not implemented` (#7017), so both sides of this measurement have #7048 applied locally. That error wasn't investigated further. - **LEGO Horizon Adventures (PPSA14632) (measured before the rebase, on 4d646b9e4 against 7c06af4af):** loading after the graphics quality screen, 65–69 presents per 10 s on `main` and 72–73 with this PR (one run per side). Its vertex buffers are mostly static, so this also covers reusing and filling in kept window snapshots. - **Frames, pixel by pixel (measured before the rebase, on 4d646b9e4 against 7c06af4af):** five titles, two runs of `main` and one run of this PR with `APS5_POISON_VERTEX_PREFIX=1`, with frames dumped by `APS5_DUMP_FRAMES` at full resolution. The titles don't play out the same from run to run, so only the frames that are identical in both `main` runs can be compared. The poisoned run matches all of them in ANIMAL WELL (55) and The Pathless (24), and all but one in Hades (2 of 3) and LEGO Horizon Adventures (6 of 7). Balatro has none, because its background animates. The two that differ are a loading bar that is one column longer and a loading icon drawn a few frames earlier. The other frames show the same scenes at slightly different moments, with no stray geometry from the poisoned bytes. <details><summary>Frame comparison</summary> | Title | frames dumped | identical in both `main` runs | of those, identical in the poisoned run | |---|---|---|---| | Hades (PPSA03355), boot to gameplay | 150, every 30th | 3 | 2 (loading bar one column longer) | | The Pathless (PPSA01825), boot to main menu, #7048 on both sides | 73, every 30th | 24 | 24 | | Balatro (PPSA21402), menu to first hand | 150, every 30th | 0 | – | | ANIMAL WELL (PPSA22520), title to first room | 150, every 30th | 55 | 55 | | LEGO Horizon Adventures (PPSA14632), menu to loading | 150, every 5th | 7 | 6 (loading icon earlier) | </details> - **Validation layer, after the rebase:** the draw and VideoOut tests pass on `main` 1da03c6f3 (73) and on this PR f223f45c1 (76, the 3 new ones included), with no `VUID-` messages on either side. They ran with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, and neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`. Before the rebase the same set gave 70 and 73. <details><summary>Tests</summary> `ctest -V -R` with `^(agc_driver_graphics|agc_draw_.*|agc_recorder_.*|agc_driver_draw_.*|agc_vertex_.*|agc_embedded_vertex_fetch.*|agc_driver_.*vertex.*|agc_driver_pipelined_indirect_draw|agc_driver_queued_index_read_order|agc_driver_mesh_index_cache|agc_driver_.*provoking_vertex|guest_indexed_draw|agc_driver_flip.*|video_out_flip_.*)$`. </details> - New tests: - `drawIndexRangeTests`, `vertexCopyStartTests` and the `ClampDrawIndices` cases in `tests/Graphics.cpp` cover the window start: restart indices, the lowest index after clamping, interleaved attributes, per-instance attributes, zero stride and a start past the range. - `agc_draw_input_reuse` covers reusing, filling in and keeping window snapshots, and the lowest index of kept index copies and ranges. - `DrawOffsetIndices` draws with a lowest index of 3, a strip that starts with a restart index, and write-watched indices drawn twice, so the second draw takes its lowest index from the kept index copy. It also runs as `agc_driver_draw_offset_indices_poisoned`, and with indices bound in place as `agc_driver_draw_offset_indices_poisoned_in_place`. Since b3e5c7c585 its indices sit in a registered guest block; before, they were constants in the test image, which the allocation registry does not cover, so that variant copied them instead of binding them in place. - Mutation check, redone at 8ee49d287d: 26 changes to the new code. One, tracking writes over the whole range instead of the window, is now the code itself: the Mewgenics fix made it so, because tracking only the window turned out slower (see above). The other 25 were rebuilt one at a time and run against the tests above, at 8ee49d287d and, for the in-place index change, again at b3e5c7c585. 21 make a test fail. The other 4: - giving indirect draws a window, which is equivalent while their vertex offsets aren't negative; - dropping the lowest index after clamping, which no draw can observe. Indices are clamped only past the last record of every per-vertex attribute that reads zeros there, and each of those fetches is then copied whole with zero padding, without a window; - checking a kept vertex snapshot for stores from the start of the read instead of from the start of the kept window, in either of the two places that pick that start in `ReusableDrawSnapshot`. Both check more bytes than needed (the part below the kept window is read from the guest again anyway), so they can only drop a snapshot, never serve stale bytes; - **After the merge with `main` 67092e70b5**, with NVIDIA driver 621.01 and the Overwolf layers disabled: the AGC, VideoOut and shader set (`-R "agc|video_out|shader"`) runs on `main` 67092e70b5 (1599) and on a409365521 (1603), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side and the layer loaded. `agc_driver_quad_pixel_mask` fails on both sides, and with `APS5_DRAW_PIPELINE=1` so do `agc_driver_draw_recapture_on_change`, `agc_driver_queued_constant_ram_dump` and `agc_driver_draw_unsupported_buffer_type_skip_refused`. `agc_owned_draw_inputs_verify` failed on a409365521 only; b442da8d6e fixes it, and at b442da8d6e the owned and draw input tests pass under the layer with both settings. Full `ctest` suite at a409365521: 4793 of 4796 pass; `vulkan_validation_gate_commands` and `agc_driver_quad_pixel_mask` fail the same way on `main`, and the third is that `agc_owned_draw_inputs_verify`. - **After the merge with `main` ed1e0ed08f**, at 69aec25b3f, with NVIDIA driver 621.01: the draw set with `agc_driver_list_restart.*` passes on `main` ed1e0ed08f (108) and on this PR (112), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side. `VK_LOADER_DEBUG=layer` shows `VK_LAYER_KHRONOS_validation` inserted and no `VK_LAYER_OW_*` layer on both sides. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides as before. `agc_driver_vertex_elected_atomic_max` is skipped on both sides because this GPU runs vertex programs in subgroups. - **After the merge with `main` 1a217758a5**, at 4a5a263920, with NVIDIA driver 621.01: the draw set with `agc_driver_list_restart.*` passes on `main` 1a217758a5 (105) and on this PR (109), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side. `VK_LOADER_DEBUG=layer` shows `VK_LAYER_KHRONOS_validation` inserted and no `VK_LAYER_OW_*` layer on both sides. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides as before. `agc_driver_vertex_elected_atomic_max`, new in `main`, is skipped on both sides because this GPU runs vertex programs in subgroups. - **After the merge with `main` 7a225bb303**, at 41c56ed22, with NVIDIA driver 621.01: the draw set with `agc_driver_list_restart.*` passes on `main` (83) and on this PR (87), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side. `VK_LOADER_DEBUG=layer` shows `VK_LAYER_KHRONOS_validation` inserted and no `VK_LAYER_OW_*` layer on both sides. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides as before. - **After the merge with `main` 3a2b919816**, at c0b700f66, with NVIDIA driver 621.01: the draw set, now with `agc_driver_list_restart.*`, passes on `main` (83) and on this PR (87), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side and the layer loaded. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides as before. This GPU has `VK_EXT_primitive_topology_list_restart`, so only `agc_driver_list_restart_compacted` takes the compaction path. Its draw keeps indices 3 4 5 after a dropped 5 4. Taking the lowest index from the first kept-count indices before compaction (4), or adding 1 to it, makes it fail. Keeping `0`, or taking the lowest of all indices before compaction, passes: both copy more, never less. - **After the merge with `main` 8ff4baf534**, at a00390354, with NVIDIA driver 621.01: the draw set (the one below without the `agc_driver_flip` and `video_out_flip` tests) passes on `main` (81) and on this PR (84), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side and the layer loaded. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides as before. - **With the Mewgenics fix**, at 2a9cbce9e, with NVIDIA driver 621.01, against `main` f55190f7e3: - Validation layer: the same draw and VideoOut set passes on `main` (98) and on this PR (101), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side and the layer loaded. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides as before. - The draw-input, index and vertex tests pass, `vertexWindowSeriesTests` included. - **After the merge with `main` cf528e78c6**, at 3f43b8f92, with NVIDIA driver 610.88: - Validation layer: a wider draw and VideoOut set (below) passes on `main` (98) and on this PR (101), with `APS5_DRAW_PIPELINE` unset and set, with no `VUID-` messages on either side and the layer loaded. With `APS5_DRAW_PIPELINE=1`, `agc_driver_draw_unsupported_buffer_type_skip_refused` fails on both sides with the same driver failure (`buffer descriptor uses an unsupported type`). <details><summary>Tests</summary> `ctest -V -R` with `^(agc_draw_.*|agc_driver_draw_.*|agc_driver_flip.*|agc_driver_graphics|.*vertex.*|agc_recorder_.*|agc_driver_mesh_.*|agc_driver_pipelined_indirect_draw|agc_driver_queued_index_read_order|guest_indexed_draw|video_out_flip_.*)$`. #8756's `containingSnapshotTests` runs in `agc_draw_snapshot_cap`. </details> - Full `ctest` suite with the GPU (`--parallel 4 --timeout 120`): 2280 of 2291 pass and 7 are skipped. The other 4 (`log_macros`, `log_macros_timestamps`, `agc_host_import_cut_lifetime` and `agc_driver_depth_plane_partial_store`) fail the same way on `main` cf528e78c6. - The measurements other than the Hades capture with the fix are from before the merge. - Full `ctest` suite before the merge, at f223f45c1 (`--parallel 4 --timeout 120`): 1894 of 1906 pass and 6 are skipped. The other 6 fail the same way on `main` 1da03c6f3: `log_macros`, `log_macros_timestamps`, `agc_driver_sample_order`, `agc_driver_sample_order_grid_reference`, `agc_driver_sample_order_recipe_depth_locations` and `agc_driver_wave32_subgroup`. Before the rebase, the fork's Windows CI passed on 7c06af4af ([run 39838320780](https://github.com/winstrex/AnyPS5/actions/runs/39838320780)), but its runner has no Vulkan device and skips the GPU tests. - `tools/check_conventions.py` passes. ### 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; speeds up PPSA03355 (Hades) 45.4 → 53.9 FPS in gameplay - [x] GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 621.01 (591.86 before the rebase), Windows 11 (10.0.26300). @BKlaasWerkman ran the draw-input, vertex and index tests on Windows 11 with an NVIDIA GeForce RTX 3060 Ti (617.42) and Intel Arc Graphics on Meteor Lake (101.9150), with the validation layer, on f223f45c1, the head before the last rebase, with the same commits ([comment](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6362716942)). Not run on AMD - [x] AI-assisted: yes
MarcZX10 commented 2026-10-29 00:45:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T00:45:04Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The current-head draw tests and performance report are extensive, but the reported Soul Hackers 2 stall remains unresolved; I cannot recommend approval while the PR has a repeatable adverse result that has not yet been compared under matched conditions.

What I checked

  • Inspected current head c0b700f66448fa43004de25e70f7dee5faa6e431, the latest report and the current main comparison.
  • Checked current hosted CI and the author's latest comment asking for additional unprofiled, poisoned, and base-control runs.
  • Checked the repo's review and AGC validation requirements. I did not run a local build or game.

Results

Check Result
Windows CI
Raw statuswindows pending
Conventions CI
Raw statusconventions pass
Other hosted jobs
Raw statuslinux skipping; register-context skipping; relinker skipping; relinker-asan skipping; write-watch skipping
Current-head GPU test report
Author-reported resultsAt c0b700f66, the draw set passed on main (83) and the PR (87), with APS5_DRAW_PIPELINE both unset and set and no VUID- messages. I did not independently run it.
Performance report
Author-reported resultsThe description contains paired main/change captures, traces, and digests for Hades. The latest capture with the Mewgenics fix reports 45.4 to 53.9 FPS and Graphics.Draw 15.0 to 11.6 ms/frame.

Negative control

The Soul Hackers 2 report used a base containing #12227 and #11602. It says the game stalled after about seven seconds in 3/3 PR runs and in 1/4 base runs, with the PR runs showing 123 file opens before stopping. That is concerning evidence, but the unequal run counts and the base's one stall do not establish that this PR introduced the problem.

Findings

Blocking

  • The stall has not been reproduced or ruled out under the matched conditions the author requested: fresh starts, no APS5_PROFILE_* variables, PR runs with and without APS5_POISON_VERTEX_PREFIX=1, and alternating base runs. Please add those results or otherwise explain the difference before requesting approval. If the stall occurs with poison enabled, include the affected frame and title state; if it also occurs on base at a similar rate, report that too. Until then, this remains an unresolved title-level regression risk, not a proven defect in this change.

Non-blocking

  • The current-head test report, mutation checks, paired performance captures, and attached digests provide substantial coverage for the draw-window behavior. They do not answer the separate Soul Hackers 2 stall report.

Sources

  • PR report and diff reviewed at c0b700f66448fa43004de25e70f7dee5faa6e431.
  • Current base: main at 3a2b91981651569163768854a1fcdc7193b6667b.
  • Soul Hackers 2 report and author's follow-up request: PR comments through 2026-10-28T15:35:26Z.

Not verified

I did not reproduce the title stall, run the requested alternating runs, build the project, or independently verify the attached traces. The hosted Windows job is pending; Linux and specialized jobs are skipped.

To get this to a good state

Please post the matched Soul Hackers 2 runs requested in the thread, with the exact base and PR revisions, run order, environment, and whether the poisoned run changed the image or loading behavior. Then the review can distinguish a PR-related failure from a timing-dependent stall.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5691524183 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875#pullrequestreview-5691524183). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T00:45:04Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The current-head draw tests and performance report are extensive, but the reported Soul Hackers 2 stall remains unresolved; I cannot recommend approval while the PR has a repeatable adverse result that has not yet been compared under matched conditions. ## What I checked - Inspected current head `c0b700f66448fa43004de25e70f7dee5faa6e431`, the latest report and the current `main` comparison. - Checked current hosted CI and the author's latest comment asking for additional unprofiled, poisoned, and base-control runs. - Checked the repo's review and AGC validation requirements. I did not run a local build or game. ## Results | Check | Result | |---|---| | Windows CI | <details><summary>Raw status</summary><code>windows pending</code></details> | | Conventions CI | <details><summary>Raw status</summary><code>conventions pass</code></details> | | Other hosted jobs | <details><summary>Raw status</summary><code>linux skipping; register-context skipping; relinker skipping; relinker-asan skipping; write-watch skipping</code></details> | | Current-head GPU test report | <details><summary>Author-reported results</summary>At `c0b700f66`, the draw set passed on `main` (83) and the PR (87), with `APS5_DRAW_PIPELINE` both unset and set and no `VUID-` messages. I did not independently run it.</details> | | Performance report | <details><summary>Author-reported results</summary>The description contains paired main/change captures, traces, and digests for Hades. The latest capture with the Mewgenics fix reports 45.4 to 53.9 FPS and `Graphics.Draw` 15.0 to 11.6 ms/frame.</details> | ## Negative control The Soul Hackers 2 report used a base containing #12227 and #11602. It says the game stalled after about seven seconds in 3/3 PR runs and in 1/4 base runs, with the PR runs showing 123 file opens before stopping. That is concerning evidence, but the unequal run counts and the base's one stall do not establish that this PR introduced the problem. ## Findings ### Blocking - The stall has not been reproduced or ruled out under the matched conditions the author requested: fresh starts, no `APS5_PROFILE_*` variables, PR runs with and without `APS5_POISON_VERTEX_PREFIX=1`, and alternating base runs. Please add those results or otherwise explain the difference before requesting approval. If the stall occurs with poison enabled, include the affected frame and title state; if it also occurs on base at a similar rate, report that too. Until then, this remains an unresolved title-level regression risk, not a proven defect in this change. ### Non-blocking - The current-head test report, mutation checks, paired performance captures, and attached digests provide substantial coverage for the draw-window behavior. They do not answer the separate Soul Hackers 2 stall report. ## Sources - PR report and diff reviewed at `c0b700f66448fa43004de25e70f7dee5faa6e431`. - Current base: `main` at `3a2b91981651569163768854a1fcdc7193b6667b`. - Soul Hackers 2 report and author's follow-up request: PR comments through `2026-10-28T15:35:26Z`. ## Not verified I did not reproduce the title stall, run the requested alternating runs, build the project, or independently verify the attached traces. The hosted Windows job is pending; Linux and specialized jobs are skipped. ## To get this to a good state Please post the matched Soul Hackers 2 runs requested in the thread, with the exact base and PR revisions, run order, environment, and whether the poisoned run changed the image or loading behavior. Then the review can distinguish a PR-related failure from a timing-dependent stall.
MarcZX10 commented 2026-10-29 22:24:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T22:24:02Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The matched Soul Hackers 2 report addresses the earlier stall concern, but the required performance and validation comparisons still use an older main than the one this PR must integrate with.

What I ran

  • Exact PR head: 34d8d68cf5bba6e4c6aece959e9e15ff4220afaa; PR base: bb04a4f1ea0175e9e4f149f0359a764d62ff3296; live main: 4c8cff191609bc5f28bf9ee2f93672b531285aa4.
  • Environment: Linux x86_64, Git 2.39.5, Python 3.11.2. No build or tests were run locally.
  • The live-main merge preview is clean. However, since the PR's base, main has changed production code in Draw.cpp, Recorder.cpp, VertexInput.hpp and VulkanDevice.cpp, all touched by this PR. That makes the older comparison evidence insufficient for the integrated tree.
git merge-tree --write-tree upstream/main refs/review/pr-9875-head
git diff --check upstream/main...refs/review/pr-9875-head
python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-9875-head

Results

Check Result
Live-main merge preview Clean; tree 98564fbbf9720183015bf566b471a137a454f8cd
Diff check Passed; no output
Conventions Passed
Soul Hackers 2 follow-up The author reports four alternating base/PR pairs on bb04a4f1ea/34d8d68cf5; all reached the first map and continued to 150 seconds. Two additional PR runs with APS5_POISON_VERTEX_PREFIX=1 showed the same frames. This resolves the earlier reported stall for those tested conditions.
Existing performance evidence The Hades comparison in the PR uses main cf528e78c6 and change 2a9cbce9e; neither is the current main/integrated head.
Hosted CI Windows passed on the PR head; Linux product and specialized jobs were skipped.
Unedited local check output
98564fbbf9720183015bf566b471a137a454f8cd
All conventions checks passed.

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

Findings

Blocking

  • Refresh the matched performance report. The repository requires main and change summary lines from the same machine and scene. Since the report's cf528e78c6 baseline, current main has substantial changes in PR-touched AGC production files, including Draw.cpp. Please integrate live main, then capture the current-main baseline and integrated PR head in the same Hades scene and machine, with their summary lines, traces and digests.
  • Refresh the required AGC validation comparison. Please run the same relevant focused tests on live main and the integrated PR head with ctest -V, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1. Report exact SHAs, GPU/driver/OS, layer-load confirmation and any new VUID- messages. The posted comparison does not cover current main 4c8cff1916 and the integrated head.

Non-blocking

  • The reported Soul Hackers 2 runs convincingly show that the earlier apparent stall can be the long opening movie and that the PR/base runs both reach the map when using the same skip script. I found no remaining blocker from that report.
  • The merge preview is clean; I am asking for current-main integration because relevant production paths changed and the old validation/performance evidence no longer covers the tree, not because of branch age alone.

Sources

Not verified

I did not build, run CTest, run GPU tests, or capture title performance locally. The Soul Hackers 2 runs and existing performance/validation reports are author-reported. Linux and specialized CI jobs were skipped.

To get this to a good state

Integrate live main, publish the matched performance pair and focused validation comparison on the new head, then request re-review. I will rerun the same non-build checks and review the exact updated head and CI.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5705753373 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875#pullrequestreview-5705753373). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T22:24:02Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The matched Soul Hackers 2 report addresses the earlier stall concern, but the required performance and validation comparisons still use an older `main` than the one this PR must integrate with. ## What I ran - Exact PR head: `34d8d68cf5bba6e4c6aece959e9e15ff4220afaa`; PR base: `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`; live `main`: `4c8cff191609bc5f28bf9ee2f93672b531285aa4`. - Environment: Linux x86_64, Git 2.39.5, Python 3.11.2. No build or tests were run locally. - The live-main merge preview is clean. However, since the PR's base, `main` has changed production code in `Draw.cpp`, `Recorder.cpp`, `VertexInput.hpp` and `VulkanDevice.cpp`, all touched by this PR. That makes the older comparison evidence insufficient for the integrated tree. ```sh git merge-tree --write-tree upstream/main refs/review/pr-9875-head git diff --check upstream/main...refs/review/pr-9875-head python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-9875-head ``` ## Results | Check | Result | |---|---| | Live-main merge preview | Clean; tree `98564fbbf9720183015bf566b471a137a454f8cd` | | Diff check | Passed; no output | | Conventions | Passed | | Soul Hackers 2 follow-up | The author reports four alternating base/PR pairs on `bb04a4f1ea`/`34d8d68cf5`; all reached the first map and continued to 150 seconds. Two additional PR runs with `APS5_POISON_VERTEX_PREFIX=1` showed the same frames. This resolves the earlier reported stall for those tested conditions. | | Existing performance evidence | The Hades comparison in the PR uses `main` `cf528e78c6` and change `2a9cbce9e`; neither is the current `main`/integrated head. | | Hosted CI | Windows passed on the PR head; Linux product and specialized jobs were skipped. | <details> <summary>Unedited local check output</summary> ```text 98564fbbf9720183015bf566b471a137a454f8cd All conventions checks passed. ``` `git diff --check` produced no output and exited 0. </details> ## Findings ### Blocking - **Refresh the matched performance report.** The repository requires `main` and change summary lines from the same machine and scene. Since the report's `cf528e78c6` baseline, current `main` has substantial changes in PR-touched AGC production files, including `Draw.cpp`. Please integrate live `main`, then capture the current-main baseline and integrated PR head in the same Hades scene and machine, with their summary lines, traces and digests. - **Refresh the required AGC validation comparison.** Please run the same relevant focused tests on live `main` and the integrated PR head with `ctest -V`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`. Report exact SHAs, GPU/driver/OS, layer-load confirmation and any new `VUID-` messages. The posted comparison does not cover current `main` `4c8cff1916` and the integrated head. ### Non-blocking - The reported Soul Hackers 2 runs convincingly show that the earlier apparent stall can be the long opening movie and that the PR/base runs both reach the map when using the same skip script. I found no remaining blocker from that report. - The merge preview is clean; I am asking for current-main integration because relevant production paths changed and the old validation/performance evidence no longer covers the tree, not because of branch age alone. ## Sources - [Performance and AGC validation rules on current `main`](https://github.com/boykopovar/AnyPS5/blob/4c8cff191609bc5f28bf9ee2f93672b531285aa4/CONTRIBUTING.md#L69-L70) - [Matched Soul Hackers 2 report](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6509527600) - [Reviewed PR head](https://github.com/boykopovar/AnyPS5/tree/34d8d68cf5bba6e4c6aece959e9e15ff4220afaa) ## Not verified I did not build, run CTest, run GPU tests, or capture title performance locally. The Soul Hackers 2 runs and existing performance/validation reports are author-reported. Linux and specialized CI jobs were skipped. ## To get this to a good state Integrate live `main`, publish the matched performance pair and focused validation comparison on the new head, then request re-review. I will rerun the same non-build checks and review the exact updated head and CI.
MarcZX10 commented 2026-10-29 23:50:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T23:50:13Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The Hades measurements in the new comment are useful, but the required performance report for this head and current main is not present in the PR description.

What I ran

  • Exact PR head: 41c56ed22ae0a9008b2f3322faa229ed5a0e0ddc; recorded PR base: 7a225bb303c1a452057000f32b70b56486625fd6.
  • Current upstream/main: 1189ec3003672bb364dd9f3119ead7b3976e3c83; merge preview is clean, tree a6155808cf8aaef355a464d437528444be86d234.
  • Environment: Linux workspace; no compiler, build, CTest, GPU test or capture was run locally.
git merge-tree --write-tree upstream/main refs/review/pr-9875-current
git diff --check upstream/main...refs/review/pr-9875-current
python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-9875-current

Results

Check Result
Current-main merge preview Clean
git diff --check Passed; no output
Conventions Passed
Author-reported performance pair Hades, main 7a225bb303 vs PR 41c56ed22; same reported machine and capture setup
Performance report in the current PR body The body contains older summary lines/traces (cf528e78c6 / 2a9cbce9ee), but not the new 7a225bb303 / 41c56ed22 pair, its two summary lines, trace attachments and digest output
Current hosted Windows job In progress when refreshed
Product Linux and specialized jobs Skipped by workflow policy
Unedited local command output
$ git merge-tree --write-tree upstream/main refs/review/pr-9875-current
a6155808cf8aaef355a464d437528444be86d234
$ git diff --check upstream/main...refs/review/pr-9875-current
[no output; exit status 0]
$ python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-9875-current
All conventions checks passed.

The author-reported Hades pair and AGC comparison are in the re-review request. They use main 7a225bb303; the current main is 1189ec3003672bb364dd9f3119ead7b3976e3c83. Since 7a225bb303, current main changed guest-buffer import/resource-validation paths and shared test registration, so the older pair does not establish the measured result for today's baseline.

Findings

Blocking

The perf report is incomplete for the updated measurement. Please add the exact aps5-summary.jsonl line for current main and this head, attach both matching traces, and include tools/trace_digest.py output in the PR description. Capture both against current main 1189ec3003672bb364dd9f3119ead7b3976e3c83 and this head using the same title, scene and machine; the existing merge preview is clean, so I am not asking for a rebase solely because the branch is behind.

Non-blocking

None found in this source re-check.

Sources

Not verified

The reported performance and validation tests are author-run; I did not independently run them. The current hosted Windows job was still running, and the product Linux job was skipped.

To get this to a good state

Post the complete matched capture pair on the current base, including both summary lines, both traces and digest output. I will rerun the same non-build checks and reassess the exact new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5706435354 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875#pullrequestreview-5706435354). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T23:50:13Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The Hades measurements in the new comment are useful, but the required performance report for this head and current `main` is not present in the PR description. ## What I ran - Exact PR head: `41c56ed22ae0a9008b2f3322faa229ed5a0e0ddc`; recorded PR base: `7a225bb303c1a452057000f32b70b56486625fd6`. - Current `upstream/main`: `1189ec3003672bb364dd9f3119ead7b3976e3c83`; merge preview is clean, tree `a6155808cf8aaef355a464d437528444be86d234`. - Environment: Linux workspace; no compiler, build, CTest, GPU test or capture was run locally. ```sh git merge-tree --write-tree upstream/main refs/review/pr-9875-current git diff --check upstream/main...refs/review/pr-9875-current python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-9875-current ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | `git diff --check` | Passed; no output | | Conventions | Passed | | Author-reported performance pair | Hades, `main` `7a225bb303` vs PR `41c56ed22`; same reported machine and capture setup | | Performance report in the current PR body | The body contains older summary lines/traces (`cf528e78c6` / `2a9cbce9ee`), but not the new `7a225bb303` / `41c56ed22` pair, its two summary lines, trace attachments and digest output | | Current hosted Windows job | In progress when refreshed | | Product Linux and specialized jobs | Skipped by workflow policy | <details> <summary>Unedited local command output</summary> ```text $ git merge-tree --write-tree upstream/main refs/review/pr-9875-current a6155808cf8aaef355a464d437528444be86d234 $ git diff --check upstream/main...refs/review/pr-9875-current [no output; exit status 0] $ python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-9875-current All conventions checks passed. ``` </details> The author-reported Hades pair and AGC comparison are in [the re-review request](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6511121466). They use `main` `7a225bb303`; the current `main` is `1189ec3003672bb364dd9f3119ead7b3976e3c83`. Since `7a225bb303`, current `main` changed guest-buffer import/resource-validation paths and shared test registration, so the older pair does not establish the measured result for today's baseline. ## Findings ### Blocking The `perf` report is incomplete for the updated measurement. Please add the exact `aps5-summary.jsonl` line for current `main` and this head, attach both matching traces, and include `tools/trace_digest.py` output in the PR description. Capture both against current `main` `1189ec3003672bb364dd9f3119ead7b3976e3c83` and this head using the same title, scene and machine; the existing merge preview is clean, so I am not asking for a rebase solely because the branch is behind. ### Non-blocking None found in this source re-check. ## Sources - [Draw-copy implementation at this head](https://github.com/boykopovar/AnyPS5/blob/41c56ed22ae0a9008b2f3322faa229ed5a0e0ddc/core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp) - [Current-main guest-buffer import path](https://github.com/boykopovar/AnyPS5/blob/1189ec3003672bb364dd9f3119ead7b3976e3c83/core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp) - [Current-main resource-validation path](https://github.com/boykopovar/AnyPS5/blob/1189ec3003672bb364dd9f3119ead7b3976e3c83/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp) ## Not verified The reported performance and validation tests are author-run; I did not independently run them. The current hosted Windows job was still running, and the product Linux job was skipped. ## To get this to a good state Post the complete matched capture pair on the current base, including both summary lines, both traces and digest output. I will rerun the same non-build checks and reassess the exact new head.
MarcZX10 commented 2026-10-30 04:14:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T04:14:41Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The paired result is on this PR’s measured base, so a newer-main capture is not required solely because main advanced; the posted captures still use extra trace switches forbidden by the performance form.

What I ran

  • PR head: 4a5a26392074ccf1b1c0ca6e5e186e7278a00297; PR base and measured main: 1a217758a55c09e817366fa4411daac854eeb3f9; current main: 5ecef095b61e7a406b279c97896f3a8a6fbd6353.
  • Current-main merge preview: clean, tree 1f4d5a28b9682386d02bec8efdbd46cfb7fb41d9.
  • Environment: Linux 6.1 x86_64, Python 3.11.2. No compiler or project build/test was run locally.
  • Commands:
git merge-tree --write-tree upstream/main upstream/pr/9875
git diff --check upstream/main...upstream/pr/9875
python3 tools/check_conventions.py --base upstream/main --head upstream/pr/9875
git diff --name-only 1a217758a55c09e817366fa4411daac854eeb3f9 upstream/main -- core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp core/libs/prx/libSceAgcDriver/Graphics/include/VertexInput.hpp core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
git diff --name-only 1a217758a55c09e817366fa4411daac854eeb3f9 upstream/main -- core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

Results

Check Result
Current-main merge preview Pass; clean tree 1f4d5a28b9682386d02bec8efdbd46cfb7fb41d9.
Diff check Pass; no output.
Conventions Pass; All conventions checks passed.
Current-main source delta No changes since the measured base in Recorder.cpp, VertexInput.hpp, GuestBufferMemory.cpp, or ShaderResources.cpp. The shared production paths changed are Draw.cpp, Draw.hpp, and VulkanDevice.cpp; I found no specific change to the vertex-copy implementation that invalidates this pair.
Matched performance pair The description contains main 1a217... and PR 4a5a... summaries, traces, and digests from the same reported machine/session. The author reports 471 vs 600 presents in the 10-second window and Graphics.Draw 16.3 vs 11.3 ms/frame. These are author-reported results, not independently reproduced.
Capture protocol The posted summary lines record APS5_TRACE_EVENTS=1048576 and APS5_TRACE_SUMMARY_EVERY=10; the performance form says to set no other APS5_TRACE_* or APS5_PROFILE_* switch. The pair therefore does not meet the report protocol.
Vulkan validation The author reports the focused draw tests passing on both measured arms with the validation layer loaded and no VUID- messages. I did not run these tests locally.
Unedited local command output

git merge-tree --write-tree upstream/main upstream/pr/9875

1f4d5a28b9682386d02bec8efdbd46cfb7fb41d9

git diff --check upstream/main...upstream/pr/9875 exited 0 and produced no output.

python3 tools/check_conventions.py --base upstream/main --head upstream/pr/9875

All conventions checks passed.

The first git diff --name-only command produced no output. The second produced:

core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp

Findings

Blocking

The summary lines show that the captures set APS5_TRACE_EVENTS and APS5_TRACE_SUMMARY_EVERY in addition to the permitted capture interval. Please recapture the same main and PR builds in the same scene/session without additional APS5_TRACE_* or APS5_PROFILE_* switches, then replace the summary lines, traces, and digests with output from those captures.

Non-blocking

I withdraw my previous request for another pair solely because main advanced from 1a217...: the reported main is this PR’s declared base, the PR includes that base, and its merge preview onto current main is clean. The repository’s performance rule asks for a matched main/change pair, not a capture against the newest main on every review refresh. I found no current-main change to the vertex-copy implementation that would invalidate this pair.

Sources

Not verified

I did not run a local build, GPU test, or capture. The performance and Vulkan-validation results above are author-reported. The current Windows hosted job was in progress at the last status refresh.

To get this to a good state

Replace the pair with captures that follow the linked form, including the exact summary lines, matching traces, and digests. I will rerun the same non-build checks on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5708005229 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875#pullrequestreview-5708005229). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T04:14:41Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The paired result is on this PR’s measured base, so a newer-main capture is not required solely because main advanced; the posted captures still use extra trace switches forbidden by the performance form. ## What I ran - PR head: `4a5a26392074ccf1b1c0ca6e5e186e7278a00297`; PR base and measured main: `1a217758a55c09e817366fa4411daac854eeb3f9`; current main: `5ecef095b61e7a406b279c97896f3a8a6fbd6353`. - Current-main merge preview: clean, tree `1f4d5a28b9682386d02bec8efdbd46cfb7fb41d9`. - Environment: Linux 6.1 x86_64, Python 3.11.2. No compiler or project build/test was run locally. - Commands: ```sh git merge-tree --write-tree upstream/main upstream/pr/9875 git diff --check upstream/main...upstream/pr/9875 python3 tools/check_conventions.py --base upstream/main --head upstream/pr/9875 git diff --name-only 1a217758a55c09e817366fa4411daac854eeb3f9 upstream/main -- core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp core/libs/prx/libSceAgcDriver/Graphics/include/VertexInput.hpp core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp git diff --name-only 1a217758a55c09e817366fa4411daac854eeb3f9 upstream/main -- core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Pass; clean tree `1f4d5a28b9682386d02bec8efdbd46cfb7fb41d9`. | | Diff check | Pass; no output. | | Conventions | Pass; `All conventions checks passed.` | | Current-main source delta | No changes since the measured base in `Recorder.cpp`, `VertexInput.hpp`, `GuestBufferMemory.cpp`, or `ShaderResources.cpp`. The shared production paths changed are `Draw.cpp`, `Draw.hpp`, and `VulkanDevice.cpp`; I found no specific change to the vertex-copy implementation that invalidates this pair. | | Matched performance pair | The description contains main `1a217...` and PR `4a5a...` summaries, traces, and digests from the same reported machine/session. The author reports 471 vs 600 presents in the 10-second window and `Graphics.Draw` 16.3 vs 11.3 ms/frame. These are author-reported results, not independently reproduced. | | Capture protocol | The posted summary lines record `APS5_TRACE_EVENTS=1048576` and `APS5_TRACE_SUMMARY_EVERY=10`; the performance form says to set no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch. The pair therefore does not meet the report protocol. | | Vulkan validation | The author reports the focused draw tests passing on both measured arms with the validation layer loaded and no `VUID-` messages. I did not run these tests locally. | <details> <summary>Unedited local command output</summary> `git merge-tree --write-tree upstream/main upstream/pr/9875` ```text 1f4d5a28b9682386d02bec8efdbd46cfb7fb41d9 ``` `git diff --check upstream/main...upstream/pr/9875` exited 0 and produced no output. `python3 tools/check_conventions.py --base upstream/main --head upstream/pr/9875` ```text All conventions checks passed. ``` The first `git diff --name-only` command produced no output. The second produced: ```text core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp ``` </details> ## Findings ### Blocking The summary lines show that the captures set `APS5_TRACE_EVENTS` and `APS5_TRACE_SUMMARY_EVERY` in addition to the permitted capture interval. Please recapture the same main and PR builds in the same scene/session without additional `APS5_TRACE_*` or `APS5_PROFILE_*` switches, then replace the summary lines, traces, and digests with output from those captures. ### Non-blocking I withdraw my previous request for another pair solely because main advanced from `1a217...`: the reported main is this PR’s declared base, the PR includes that base, and its merge preview onto current main is clean. The repository’s performance rule asks for a matched main/change pair, not a capture against the newest main on every review refresh. I found no current-main change to the vertex-copy implementation that would invalidate this pair. ## Sources - [Performance rule at current main](https://github.com/boykopovar/AnyPS5/blob/5ecef095b61e7a406b279c97896f3a8a6fbd6353/CONTRIBUTING.md#L71) - [Capture protocol at current main](https://github.com/boykopovar/AnyPS5/blob/5ecef095b61e7a406b279c97896f3a8a6fbd6353/.github/ISSUE_TEMPLATE/performance.yml#L8-L13) - [Vertex-window implementation at reviewed head](https://github.com/boykopovar/AnyPS5/blob/4a5a26392074ccf1b1c0ca6e5e186e7278a00297/core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp) ## Not verified I did not run a local build, GPU test, or capture. The performance and Vulkan-validation results above are author-reported. The current Windows hosted job was in progress at the last status refresh. ## To get this to a good state Replace the pair with captures that follow the linked form, including the exact summary lines, matching traces, and digests. I will rerun the same non-build checks on the new head.
MarcZX10 commented 2026-10-30 15:19:17 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The new head incorporates current main, but the performance evidence still uses an earlier source tree and capture switches prohibited by the repository's report form.

What I ran

Reviewed exact head 69aec25b3ffabed6af83e8bf305c2d245e74fccb against PR base/current main ed1e0ed08fc2452192df91793a33dd0cc7ad5212 on Debian 12 x86_64, Python 3.11.2, GCC 12.2.0. The current-main merge preview is clean; I did not build or run CTest or GPU captures locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9875
git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-9875
git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-9875
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-9875
git diff --name-only 1a217758a55c09e817366fa4411daac854eeb3f9 refs/remotes/upstream/main -- core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp core/libs/prx/libSceAgcDriver/Graphics/include/VertexInput.hpp core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
gh pr checks 9875 --repo boykopovar/AnyPS5

Results

Check Result
Diff check Passed.
Conventions and PR template Passed.
Current-main merge preview Clean; tree 55eb85a6bfa9c7d5ac9d43810b2bb88b6dbd3d6f. The current head includes current main.
Main changes since the measured base VulkanDevice.cpp, Draw.hpp, Recorder.hpp, Draw.cpp and Recorder.cpp changed between measured base 1a217758a5 and current main.
Hosted CI Conventions, eligibility, labels, library-portability and report checks were pending at the final refresh.
Precheck helpers ABI audit and test-quality scripts are absent from the isolated PR checkout; the stack check passed.
Performance report The PR body still reports captures from main 1a217758a5 and PR commit 4a5a26392074, not the current base/head. Both summary lines include extra trace switches forbidden by the current performance form.
Selected unedited output
55eb85a6bfa9c7d5ac9d43810b2bb88b6dbd3d6f
All conventions checks passed.
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10","APS5_TRACE_SUMMARY_EVERY":"10"}
conventions	pending
eligibility	pending
labels	pending
library-portability	pending
report	pending

Negative control

Not run locally. The PR reports that the vertexWindowSeriesTests cases fail without the snapshot-fill fix; I did not build an exact-head binary to exercise that control.

Findings

Blocking

The performance form requires a base/change pair on the same machine and scene, with no extra APS5_TRACE_* or APS5_PROFILE_* switches. The posted lines set APS5_TRACE_EVENTS and APS5_TRACE_SUMMARY_EVERY, so the attached captures do not meet that protocol. They also compare main 1a217758a5 with PR commit 4a5a26392074, while the current head is 69aec25b3f; between that measured base and current main, the five production files listed above changed. Please capture a new pair on current main ed1e0ed08fc2452192df91793a33dd0cc7ad5212 and exact PR head 69aec25b3ffabed6af83e8bf305c2d245e74fccb, using only the permitted capture-window setting, with matching scene/settings/machine. Add both summary lines, both traces and the unedited tools/trace_digest.py output.

The earlier Vulkan-validation comparison is also on the 1a217758a5 base. Since current main changed AGC production files involved in this PR, rerun the focused validation comparison on current main and this exact head, and report any new VUID- messages.

Non-blocking

The PR-specific code at 4a5a26392074 is an ancestor of the new merge head; no local build or GPU result was produced in this review. The current hosted checks were still pending.

Sources

Not verified

No local build, CTest, GPU validation run, game capture or trace digest was performed. Author-reported tests and captures are on earlier heads and were not independently reproduced.

To get this to a good state

Post a compliant current-base/current-head Hades pair with the two summary lines, trace attachments and digest output; repeat the focused AGC validation comparison on the same base/head. I will re-run the no-build checks and inspect the new evidence before reviewing again.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5714454093 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875#pullrequestreview-5714454093). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T15:19:17Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The new head incorporates current `main`, but the performance evidence still uses an earlier source tree and capture switches prohibited by the repository's report form. ## What I ran Reviewed exact head `69aec25b3ffabed6af83e8bf305c2d245e74fccb` against PR base/current `main` `ed1e0ed08fc2452192df91793a33dd0cc7ad5212` on Debian 12 x86_64, Python 3.11.2, GCC 12.2.0. The current-main merge preview is clean; I did not build or run CTest or GPU captures locally. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 9875 git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-9875 git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-9875 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-9875 git diff --name-only 1a217758a55c09e817366fa4411daac854eeb3f9 refs/remotes/upstream/main -- core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp core/libs/prx/libSceAgcDriver/Graphics/include/VertexInput.hpp core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp gh pr checks 9875 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff check | Passed. | | Conventions and PR template | Passed. | | Current-main merge preview | Clean; tree `55eb85a6bfa9c7d5ac9d43810b2bb88b6dbd3d6f`. The current head includes current `main`. | | Main changes since the measured base | `VulkanDevice.cpp`, `Draw.hpp`, `Recorder.hpp`, `Draw.cpp` and `Recorder.cpp` changed between measured base `1a217758a5` and current `main`. | | Hosted CI | Conventions, eligibility, labels, library-portability and report checks were pending at the final refresh. | | Precheck helpers | ABI audit and test-quality scripts are absent from the isolated PR checkout; the stack check passed. | | Performance report | The PR body still reports captures from `main` `1a217758a5` and PR commit `4a5a26392074`, not the current base/head. Both summary lines include extra trace switches forbidden by the current performance form. | <details><summary>Selected unedited output</summary> ```text 55eb85a6bfa9c7d5ac9d43810b2bb88b6dbd3d6f ``` ```text All conventions checks passed. ``` ```text core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp ``` ```text "env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:10","APS5_TRACE_SUMMARY_EVERY":"10"} ``` ```text conventions pending eligibility pending labels pending library-portability pending report pending ``` </details> ## Negative control Not run locally. The PR reports that the `vertexWindowSeriesTests` cases fail without the snapshot-fill fix; I did not build an exact-head binary to exercise that control. ## Findings ### Blocking The performance form requires a base/change pair on the same machine and scene, with no extra `APS5_TRACE_*` or `APS5_PROFILE_*` switches. The posted lines set `APS5_TRACE_EVENTS` and `APS5_TRACE_SUMMARY_EVERY`, so the attached captures do not meet that protocol. They also compare `main` `1a217758a5` with PR commit `4a5a26392074`, while the current head is `69aec25b3f`; between that measured base and current `main`, the five production files listed above changed. Please capture a new pair on current `main` `ed1e0ed08fc2452192df91793a33dd0cc7ad5212` and exact PR head `69aec25b3ffabed6af83e8bf305c2d245e74fccb`, using only the permitted capture-window setting, with matching scene/settings/machine. Add both summary lines, both traces and the unedited `tools/trace_digest.py` output. The earlier Vulkan-validation comparison is also on the `1a217758a5` base. Since current `main` changed AGC production files involved in this PR, rerun the focused validation comparison on current `main` and this exact head, and report any new `VUID-` messages. ### Non-blocking The PR-specific code at `4a5a26392074` is an ancestor of the new merge head; no local build or GPU result was produced in this review. The current hosted checks were still pending. ## Sources - [Performance report protocol at current main](https://github.com/boykopovar/AnyPS5/blob/ed1e0ed08fc2452192df91793a33dd0cc7ad5212/.github/ISSUE_TEMPLATE/performance.yml) - [Current-main AGC changes in measured paths](https://github.com/boykopovar/AnyPS5/compare/1a217758a55c09e817366fa4411daac854eeb3f9...ed1e0ed08fc2452192df91793a33dd0cc7ad5212) - [Reviewed PR source at head 69aec25b](https://github.com/boykopovar/AnyPS5/tree/69aec25b3ffabed6af83e8bf305c2d245e74fccb) - [Current PR evidence](https://github.com/boykopovar/AnyPS5/pull/9875) ## Not verified No local build, CTest, GPU validation run, game capture or trace digest was performed. Author-reported tests and captures are on earlier heads and were not independently reproduced. ## To get this to a good state Post a compliant current-base/current-head Hades pair with the two summary lines, trace attachments and digest output; repeat the focused AGC validation comparison on the same base/head. I will re-run the no-build checks and inspect the new evidence before reviewing again.
MarcZX10 commented 2026-10-31 22:54:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T22:54:57Z.

Review: APPROVED


Reviewed — looks good

The matched performance capture now meets the repository protocol, current-base validation shows no new Vulkan findings, and I found no remaining blocking issue.

What I ran

Reviewed exact head a3fc34a47719e664df1c47f9609408803d38c330; the PR's recorded base is f776fddcffd1cfece220ecdd894371988b164f6a, and current main is 7a5d9bf02af636382aec927593b1a5867899ed0f. The merge preview against current main was clean (tree 4219b4ec1ef59184a070376ae0713532a1e078fd). The six AGC production-file patches from the measured base/change pair have the same stable patch IDs as the current base/head patches, and current main has no changes in those six paths since the PR's recorded base. Environment: Debian Linux 6.1, Python 3.11.2, GCC 12.2.0. I did not build or run CTest locally; I did run trace_digest.py on both attached traces.

git diff --check 7a5d9bf02af636382aec927593b1a5867899ed0f...a3fc34a47719e664df1c47f9609408803d38c330
python3 tools/check_conventions.py --base 7a5d9bf02af636382aec927593b1a5867899ed0f --head a3fc34a47719e664df1c47f9609408803d38c330 --title 'perf(agc): copy only the vertex records a draw fetches' --body /tmp/pr-body-9875.md
git merge-tree --write-tree 7a5d9bf02af636382aec927593b1a5867899ed0f a3fc34a47719e664df1c47f9609408803d38c330
python3 tools/trace_digest.py /tmp/anyps5-9875-verified-traces/main/main/aps5-trace-ed1e0ed08fc2-55888.json.gz
python3 tools/trace_digest.py /tmp/anyps5-9875-verified-traces/pr/pr/aps5-trace-69aec25b3ffa-51504.json.gz

Results

Check Result
Patch whitespace Passed; no output from git diff --check.
Repository conventions and PR form Passed.
Current-main merge preview Passed; clean.
Performance evidence Both attached archives contain one matching Hades summary line and trace. I verified identical title/scene, GPU, driver, OS, resolution, capture window, and allowed switches; both traces report no dropped events. trace_digest.py ran successfully on each trace. The measured production diff is patch-ID identical to the six corresponding current-base/head production patches.
Author-reported current-base Vulkan validation Against main f776fddcffd1 and this exact head, the author reports 115 base / 119 PR cases. With APS5_DRAW_PIPELINE unset, all passed; with it set, one unsupported-buffer-type case failed on both sides, while the four new tests passed on the PR. No VUID- messages were reported; the same vertex elected-atomic test was skipped on both sides. I did not run these tests.
Hosted CI Windows passed. Eligibility, conventions, labels, library-portability, and report passed. Linux and specialized product jobs were skipped.
Local build and CTest Not run.
Selected raw output
All conventions checks passed.
4219b4ec1ef59184a070376ae0713532a1e078fd
**seconds 150:4** from present 7617: 208 presents, frame p50 19.3 / p90 20.9 / p99 22.4 / max 28.2 ms, GPU busy 1.3 ms per present
NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit ed1e0ed08fc2, dropped: no
**seconds 150:4** from present 8841: 237 presents, frame p50 16.7 / p90 17.7 / p99 19.8 / max 21.3 ms, GPU busy 1.4 ms per present
NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit 69aec25b3ffa, dropped: no
Precheck limitation

The no-build precheck passed diff and convention checks but could not complete its ABI/test-quality stages because those helper scripts are not present in its isolated PR snapshot. The CMake test-fragment glob and the three changed fragment registrations were inspected directly.

/usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-9875/head-a3fc34a47719-5ab5215a/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-9875/head-a3fc34a47719-5ab5215a/tools/pr_test_quality.py': [Errno 2] No such file or directory

Findings

Blocking

None.

Non-blocking

The hosted Linux product job and specialized platform/GPU jobs were skipped. The author supplied current-base validation results for the GPU-dependent change; I have not independently reproduced those runs.

Sources

Not verified

I did not locally build the project, run CTest, reproduce the Windows GPU/Vulkan validation report, or test on an AMD GPU or a PS5 console. The hosted Linux product job was skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5725346516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9875#pullrequestreview-5725346516). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T22:54:57Z. **Review:** APPROVED --- # Reviewed — looks good The matched performance capture now meets the repository protocol, current-base validation shows no new Vulkan findings, and I found no remaining blocking issue. ## What I ran Reviewed exact head `a3fc34a47719e664df1c47f9609408803d38c330`; the PR's recorded base is `f776fddcffd1cfece220ecdd894371988b164f6a`, and current `main` is `7a5d9bf02af636382aec927593b1a5867899ed0f`. The merge preview against current `main` was clean (tree `4219b4ec1ef59184a070376ae0713532a1e078fd`). The six AGC production-file patches from the measured base/change pair have the same stable patch IDs as the current base/head patches, and current `main` has no changes in those six paths since the PR's recorded base. Environment: Debian Linux 6.1, Python 3.11.2, GCC 12.2.0. I did not build or run CTest locally; I did run `trace_digest.py` on both attached traces. ```sh git diff --check 7a5d9bf02af636382aec927593b1a5867899ed0f...a3fc34a47719e664df1c47f9609408803d38c330 python3 tools/check_conventions.py --base 7a5d9bf02af636382aec927593b1a5867899ed0f --head a3fc34a47719e664df1c47f9609408803d38c330 --title 'perf(agc): copy only the vertex records a draw fetches' --body /tmp/pr-body-9875.md git merge-tree --write-tree 7a5d9bf02af636382aec927593b1a5867899ed0f a3fc34a47719e664df1c47f9609408803d38c330 python3 tools/trace_digest.py /tmp/anyps5-9875-verified-traces/main/main/aps5-trace-ed1e0ed08fc2-55888.json.gz python3 tools/trace_digest.py /tmp/anyps5-9875-verified-traces/pr/pr/aps5-trace-69aec25b3ffa-51504.json.gz ``` ## Results | Check | Result | |---|---| | Patch whitespace | Passed; no output from `git diff --check`. | | Repository conventions and PR form | Passed. | | Current-main merge preview | Passed; clean. | | Performance evidence | Both attached archives contain one matching Hades summary line and trace. I verified identical title/scene, GPU, driver, OS, resolution, capture window, and allowed switches; both traces report no dropped events. `trace_digest.py` ran successfully on each trace. The measured production diff is patch-ID identical to the six corresponding current-base/head production patches. | | Author-reported current-base Vulkan validation | Against `main` `f776fddcffd1` and this exact head, the author reports 115 base / 119 PR cases. With `APS5_DRAW_PIPELINE` unset, all passed; with it set, one unsupported-buffer-type case failed on both sides, while the four new tests passed on the PR. No `VUID-` messages were reported; the same vertex elected-atomic test was skipped on both sides. I did not run these tests. | | Hosted CI | Windows passed. Eligibility, conventions, labels, library-portability, and report passed. Linux and specialized product jobs were skipped. | | Local build and CTest | Not run. | <details><summary>Selected raw output</summary> ```text All conventions checks passed. 4219b4ec1ef59184a070376ae0713532a1e078fd ``` ```text **seconds 150:4** from present 7617: 208 presents, frame p50 19.3 / p90 20.9 / p99 22.4 / max 28.2 ms, GPU busy 1.3 ms per present NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit ed1e0ed08fc2, dropped: no ``` ```text **seconds 150:4** from present 8841: 237 presents, frame p50 16.7 / p90 17.7 / p99 19.8 / max 21.3 ms, GPU busy 1.4 ms per present NVIDIA GeForce RTX 5070 Ti, NVIDIA 621.01, Windows 10.0.26300, 1920x1080, commit 69aec25b3ffa, dropped: no ``` </details> <details><summary>Precheck limitation</summary> The no-build precheck passed diff and convention checks but could not complete its ABI/test-quality stages because those helper scripts are not present in its isolated PR snapshot. The CMake test-fragment glob and the three changed fragment registrations were inspected directly. ```text /usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-9875/head-a3fc34a47719-5ab5215a/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-precheck-current-9875/head-a3fc34a47719-5ab5215a/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Findings ### Blocking None. ### Non-blocking The hosted Linux product job and specialized platform/GPU jobs were skipped. The author supplied current-base validation results for the GPU-dependent change; I have not independently reproduced those runs. ## Sources - [Performance report requirements at current `main`](https://github.com/boykopovar/AnyPS5/blob/7a5d9bf02af636382aec927593b1a5867899ed0f/.github/ISSUE_TEMPLATE/performance.yml). - [Exact-head current-base Vulkan validation report from the author](https://github.com/boykopovar/AnyPS5/pull/9875#issuecomment-6550074009). - [PR source at reviewed head](https://github.com/boykopovar/AnyPS5/tree/a3fc34a47719e664df1c47f9609408803d38c330). ## Not verified I did not locally build the project, run CTest, reproduce the Windows GPU/Vulkan validation report, or test on an AMD GPU or a PS5 console. The hosted Linux product job was skipped.
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!9875
No description provided.