perf(agc): keep draw snapshots in resizable BAR memory #9712

Open
panicDa3m0n wants to merge 12 commits from upstream-pr/9712 into main
panicDa3m0n commented 2026-10-22 09:32:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by panicDa3m0n on 2026-10-22T09:32:31Z.


What

Summary. Draw snapshots of read-only storage buffers and vertex copies go to resizable BAR memory when the device exposes one, and stay in host memory otherwise or with APS5_NO_BAR_SNAPSHOTS=1; index copies stay in host memory. On an RTX 4070 Ti SUPER at Astro Bot's Crash Site, three alternating rounds against main 8499ea52e give a frame p50 of 152.8-160.3 ms instead of 174.5-174.6 ms, and GPU time per present of 91.6-96.4 ms instead of about 152 ms. New tests cover the memory choice, the index copies and the mapped-buffer fallbacks, and each fails on a deliberate mistake.

Draw snapshots of read-only storage buffers and the vertex copies of draws now live in device-local host-visible memory when the device exposes a resizable BAR over its device-local heap (a host-visible device-local type on a heap of at least 4 GiB), and in host memory otherwise. The CPU still fills them with memcpy, but the GPU reads them from VRAM instead of over PCIe. Index copies stay in host memory: the CPU scans them for the highest index and the mesh restart table, and those scans read the same copy the draw binds.

The CPU never reads BAR memory back on the draw path: refreshing a stale snapshot rewrites its changed blocks without comparing them. APS5_NO_BAR_SNAPSHOTS=1 keeps the snapshots and vertex copies in host memory as before.

A mapped device-local Buffer takes host memory in three cases:

  • when none of the types in its memoryTypeBits is mapped device-local, since Vulkan reports the supported types per resource and they may exclude the BAR type the device lists;
  • when the reported budget of the device-local heap has no room for it, as DeviceMemoryType places device buffers;
  • when its allocation, or that of its slab block, is still refused after the pool trim and the cache reclaim, as device buffers and images do through RefusedDeviceMemoryFallback.

Properties() then reports host memory, so refreshing such a snapshot compares its blocks again. The kept snapshots stay within the existing budgets: 1 GiB for storage snapshots and 1 GiB for draw inputs.

Why: on an RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16) shaders read host memory at 6-8 GB/s sequentially and 1.4 GB/s scattered, against 650 and 92 GB/s from VRAM.

Tests:

  • snapshotMemoryTests in tests/Graphics.cpp checks the choice of memory:
    • a BAR over the whole device heap is taken;
    • the switch keeps host memory;
    • a 256 MiB BAR window is not taken;
    • a device without host-visible device memory keeps host snapshots.
  • agc_draw_input_memory copies indices, stores to the guest source, and checks that the copy is in host memory and keeps its highest index.
  • MappedDevicePlacement in tests/BufferPool.cpp places a mapped device-local buffer and a slab within the budget, over it, after a refused allocation, and with the BAR type excluded from their memoryTypeBits, with and without VK_EXT_memory_budget.

Related:

  • #8756 binds a kept snapshot at an offset, which works the same in BAR memory. The two change neighbouring lines of PrepareDrawBindings, so the second to land needs a small rebase.
  • #6553 (draft) adds Context::HeapFits for the budget check that DeviceMemoryType and MappedBufferProperties both write inline, and takes a host type only when its heap has room. Whichever of the two lands second can use it in MappedBufferProperties and RefusedMappedMemoryFallback.
  • #9875 copies only the vertex records a draw fetches. It changes the same line of CopyDrawInput as this pull request: this one picks the copy's memory, #9875 the bytes it reads. Merged together they conflict there, in CMakeLists.txt and in tests/Recorder.cpp, and the second to land keeps both.
  • #6044 converts CTest registrations to add_library_test. If it lands first, agc_draw_input_memory moves to that helper and the Depends line below names it.
  • The existing verifySnapshots check reads snapshots back on the CPU. With this change that read is uncached on device memory, slower but still correct.

Tested

Windows 11 (10.0.26200), NVIDIA GeForce RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16), i7-11700K, 32 GB; Astro Bot (PPSA21567, 01.019.000) at Crash Site with its default settings, 3840x2160. main below is 8499ea52e, the base of this PR.

  • Each new check fails when the code it covers is changed, and passes on the head:
    • snapshotMemoryTests, without the heap-size check of SnapshotMemoryProperties: a 256 MiB BAR window was taken. This ran on b5b8d4e27, which has the same check and test.
    • agc_draw_input_memory, with index copies in snapshot memory: an index copy left host memory, so its highest index would be scanned from the guest instead of the copy.
    • agc_buffer_pool (MappedDevicePlacement):
      • without the budget placement: a mapped device-local buffer over the device-local budget was not placed in host memory;
      • without the refused-memory fallback of Buffer: the refused allocation throws (vkAllocateMemory buffer ... Vulkan result -2);
      • without the fallback of its slabs: the refused slab block throws (vkAllocateMemory buffer slab ... Vulkan result -2);
      • with the budget check given the slab's size instead of its block's: a mapped device-local slab whose block exceeds the device-local budget was not placed in host memory;
      • with the memory type check moved back after the early return taken without VK_EXT_memory_budget: the buffer whose mask excludes the BAR type throws (AGC graphics: required Vulkan memory type is unavailable);
      • with the throwing MemoryType lookup in place of the mask check: the same throw with the budget extension.
  • ctest -R ^agc_ on this PR's head (895 tests): all pass except four, and three skip on this device (sparse host import, dma-buf import, stencil reference export).
    • agc_driver_sample_order, agc_driver_sample_order_grid_reference and agc_driver_sample_order_recipe_depth_locations fail the same way on main's build at 3ca07d086 on this machine ("the slopes did not leave depth both at and below the clear value").
    • agc_compute_pipeline_capture_optional_byte_cap timed out in the parallel run: it writes 256 MiB to this machine's slow temporary folder.
  • Khronos validation layer 1.4.363.0, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V:
    • The tests are the draw, vertex, index and snapshot tests (agc_driver_draw_*, agc_driver_vertex_*, agc_driver_rect_list_*, agc_driver_mesh_index_cache, agc_driver_graphics, agc_driver_zero_stride_vertex_fetch), plus agc_draw_input_memory on the head.
    • They ran on main's build at 8499ea52e (26 tests), on this PR's head (27) and on the head with APS5_NO_BAR_SNAPSHOTS=1 (27).
    • In all three runs every test passes, and no log has a VUID- error or a was not found but was requested by env var VK_INSTANCE_LAYERS line.
    • Each log has the same 10 warnings: 9 Undefined-Value-ShaderOutputNotConsumed-DynamicRendering and 1 Undefined-Value-ShaderOutputNotConsumed.
  • Performance, captured as the Performance report form describes:
    • Capture. Each run uses APS5_TRACE_SECONDS=150:5 and no other APS5_TRACE_* or APS5_PROFILE_* switch, with warm shader caches. Builds alternate main and this PR in one session.
    • Log. Every run's stdout and stderr went to files through the launcher (Start-Process -RedirectStandardOutput), the same for all runs.
    • Import budget. Both sides ran with APS5_HOST_IMPORT_MIB=13312. On this 32 GB machine the default host import budget is 8149 MiB, below what Crash Site's largest heaps need, so they fall back to copies. #6472 set that budget; #7844 changes it.
    • Windows. The windows are time-based because the number of presents before Crash Site varies between runs. For the same reason performance_compare.py lists window.first_present as the only configuration difference. The absolute times include the trace's own cost.

Over the three rounds, frame p50 goes from 174.5-174.6 ms on main to 152.8-160.3 ms with this PR (−19.2, −14.3 and −21.7 ms per round), and GPU busy time per present from 152.0-152.6 ms to 91.6-96.4 ms. Index copies in host memory account for about 12-15 ms of GPU time per present against the first version of this PR, which kept them in BAR memory (83.5-88.1 ms against 98.3-99.7 ms, both on d6eafa54d).

Run Build Commit Frame p50 / p90 / p99 (ms) GPU busy per present (ms) Busiest queue workers (%)
1 main 8499ea52e 174.5 / 183.4 / 189.2 152.2 99, 98, 94
2 this PR b8663c514 155.3 / 164.0 / 165.2 96.2 99, 98, 94
3 main 8499ea52e 174.6 / 182.9 / 185.6 152.6 99, 98, 94
4 this PR b8663c514 160.3 / 167.4 / 172.9 91.6 99, 98, 95
5 main 8499ea52e 174.5 / 183.5 / 184.9 152.0 99, 97, 94
6 this PR b8663c514 152.8 / 161.1 / 166.5 96.4 99, 98, 94

Summary lines, in run order:

{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2938,"ms":5090.897},"presents":29,"frame_ms":{"p50":174.458,"p90":183.441,"p99":189.159,"max":189.159},"gpu_busy_ms_per_present":152.250,"worker_busy_pct":{"queue worker 0x0":98.786,"queue worker 0x40":97.544,"queue worker 0x48":94.148,"queue worker 0x46":10.122},"top_phases_ms_per_frame":{"Driver.Packet":527.312,"Driver.Packet.memory_wait":302.260,"Driver.Packet.draw":91.258,"Driver.Draw":90.090,"Graphics.Draw":83.514,"Graphics.Draw.draw_and_resource_release":66.774,"Driver.Packet.prepare_memory":60.030,"Driver.Draw.shader_compile_and_link":55.787},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25288.json.gz"}
{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2753,"ms":5110.320},"presents":33,"frame_ms":{"p50":155.333,"p90":164.003,"p99":165.208,"max":165.208},"gpu_busy_ms_per_present":96.173,"worker_busy_pct":{"queue worker 0x0":98.684,"queue worker 0x40":97.781,"queue worker 0x48":94.318,"queue worker 0x46":11.173},"top_phases_ms_per_frame":{"Driver.Packet":467.172,"Driver.Packet.memory_wait":275.849,"Driver.Packet.draw":87.205,"Graphics.Draw":86.542,"Driver.Draw":86.075,"Graphics.Draw.draw_and_resource_release":69.994,"Driver.Draw.shader_compile_and_link":52.713,"Driver.Packet.dispatch":43.352},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-26736.json.gz"}
{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2660,"ms":5017.386},"presents":29,"frame_ms":{"p50":174.619,"p90":182.895,"p99":185.561,"max":185.561},"gpu_busy_ms_per_present":152.577,"worker_busy_pct":{"queue worker 0x0":98.804,"queue worker 0x40":97.803,"queue worker 0x48":93.909,"queue worker 0x46":9.464},"top_phases_ms_per_frame":{"Driver.Packet":518.590,"Driver.Packet.memory_wait":298.946,"Driver.Packet.draw":86.549,"Driver.Draw":85.458,"Graphics.Draw":81.895,"Driver.Packet.prepare_memory":65.500,"Graphics.Draw.draw_and_resource_release":65.075,"Driver.Draw.shader_compile_and_link":52.003},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-12684.json.gz"}
{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":4310,"ms":5118.256},"presents":32,"frame_ms":{"p50":160.333,"p90":167.439,"p99":172.874,"max":172.874},"gpu_busy_ms_per_present":91.612,"worker_busy_pct":{"queue worker 0x0":98.652,"queue worker 0x40":97.934,"queue worker 0x48":94.517,"queue worker 0x46":9.894},"top_phases_ms_per_frame":{"Driver.Packet":481.041,"Driver.Packet.memory_wait":286.595,"Driver.Packet.draw":92.170,"Graphics.Draw":91.690,"Driver.Draw":90.991,"Graphics.Draw.draw_and_resource_release":75.211,"Driver.Draw.shader_compile_and_link":55.081,"Shader.DrawStage":44.516},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-3760.json.gz"}
{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2658,"ms":5045.459},"presents":29,"frame_ms":{"p50":174.497,"p90":183.493,"p99":184.907,"max":184.907},"gpu_busy_ms_per_present":151.991,"worker_busy_pct":{"queue worker 0x0":98.787,"queue worker 0x40":97.445,"queue worker 0x48":94.411,"queue worker 0x46":9.031},"top_phases_ms_per_frame":{"Driver.Packet":520.917,"Driver.Packet.memory_wait":298.770,"Driver.Packet.draw":91.749,"Driver.Draw":90.597,"Graphics.Draw":83.471,"Graphics.Draw.draw_and_resource_release":66.106,"Driver.Packet.prepare_memory":55.606,"Driver.Draw.shader_compile_and_link":53.222},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25028.json.gz"}
{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2779,"ms":5089.771},"presents":33,"frame_ms":{"p50":152.754,"p90":161.061,"p99":166.455,"max":166.455},"gpu_busy_ms_per_present":96.415,"worker_busy_pct":{"queue worker 0x0":98.647,"queue worker 0x40":97.920,"queue worker 0x48":94.465,"queue worker 0x46":11.271},"top_phases_ms_per_frame":{"Driver.Packet":465.854,"Driver.Packet.memory_wait":274.814,"Driver.Packet.draw":87.031,"Graphics.Draw":86.515,"Driver.Draw":85.879,"Graphics.Draw.draw_and_resource_release":70.117,"Driver.Draw.shader_compile_and_link":51.299,"Driver.Packet.dispatch":43.309},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-27560.json.gz"}
performance_compare.py, round 1

Performance comparison

Capture Commit Trace Presents Window (ms)
baseline 8499ea52e5 aps5-trace-8499ea52e571-25288.json.gz 29 5090.897
candidate b8663c514e aps5-trace-b8663c514ef5-26736.json.gz 33 5110.320
  • Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
  • Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
  • A missing top phase is unreported, not zero; its change is unavailable.
  • Recorded configuration differs; these measurements do not isolate the code change.

Configuration differences

Setting Baseline Candidate
window.first_present 2938 2753

Frame and GPU times (ms)

Metric Baseline Candidate Change Change (%)
frame_ms.p50 174.458 155.333 -19.125 -10.963
frame_ms.p90 183.441 164.003 -19.438 -10.596
frame_ms.p99 189.159 165.208 -23.951 -12.662
frame_ms.max 189.159 165.208 -23.951 -12.662
mean_frame_ms 175.548 154.858 -20.690 -11.786
gpu_busy_ms_per_present 152.250 96.173 -56.077 -36.832

Top phases (ms per frame)

Metric Baseline Candidate Change Change (%)
Driver.Draw 90.090 86.075 -4.015 -4.457
Driver.Draw.shader_compile_and_link 55.787 52.713 -3.074 -5.510
Driver.Packet 527.312 467.172 -60.140 -11.405
Driver.Packet.dispatch n/a 43.352 n/a n/a
Driver.Packet.draw 91.258 87.205 -4.053 -4.441
Driver.Packet.memory_wait 302.260 275.849 -26.411 -8.738
Driver.Packet.prepare_memory 60.030 n/a n/a n/a
Graphics.Draw 83.514 86.542 +3.028 +3.626
Graphics.Draw.draw_and_resource_release 66.774 69.994 +3.220 +4.822
performance_compare.py, round 2

Performance comparison

Capture Commit Trace Presents Window (ms)
baseline 8499ea52e5 aps5-trace-8499ea52e571-12684.json.gz 29 5017.386
candidate b8663c514e aps5-trace-b8663c514ef5-3760.json.gz 32 5118.256
  • Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
  • Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
  • A missing top phase is unreported, not zero; its change is unavailable.
  • Recorded configuration differs; these measurements do not isolate the code change.

Configuration differences

Setting Baseline Candidate
window.first_present 2660 4310

Frame and GPU times (ms)

Metric Baseline Candidate Change Change (%)
frame_ms.p50 174.619 160.333 -14.286 -8.181
frame_ms.p90 182.895 167.439 -15.456 -8.451
frame_ms.p99 185.561 172.874 -12.687 -6.837
frame_ms.max 185.561 172.874 -12.687 -6.837
mean_frame_ms 173.013 159.946 -13.068 -7.553
gpu_busy_ms_per_present 152.577 91.612 -60.965 -39.957

Top phases (ms per frame)

Metric Baseline Candidate Change Change (%)
Driver.Draw 85.458 90.991 +5.533 +6.475
Driver.Draw.shader_compile_and_link 52.003 55.081 +3.078 +5.919
Driver.Packet 518.590 481.041 -37.549 -7.241
Driver.Packet.draw 86.549 92.170 +5.621 +6.495
Driver.Packet.memory_wait 298.946 286.595 -12.351 -4.132
Driver.Packet.prepare_memory 65.500 n/a n/a n/a
Graphics.Draw 81.895 91.690 +9.795 +11.960
Graphics.Draw.draw_and_resource_release 65.075 75.211 +10.136 +15.576
Shader.DrawStage n/a 44.516 n/a n/a
performance_compare.py, round 3

Performance comparison

Capture Commit Trace Presents Window (ms)
baseline 8499ea52e5 aps5-trace-8499ea52e571-25028.json.gz 29 5045.459
candidate b8663c514e aps5-trace-b8663c514ef5-27560.json.gz 33 5089.771
  • Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene.
  • Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
  • A missing top phase is unreported, not zero; its change is unavailable.
  • Recorded configuration differs; these measurements do not isolate the code change.

Configuration differences

Setting Baseline Candidate
window.first_present 2658 2779

Frame and GPU times (ms)

Metric Baseline Candidate Change Change (%)
frame_ms.p50 174.497 152.754 -21.743 -12.460
frame_ms.p90 183.493 161.061 -22.432 -12.225
frame_ms.p99 184.907 166.455 -18.452 -9.979
frame_ms.max 184.907 166.455 -18.452 -9.979
mean_frame_ms 173.981 154.235 -19.746 -11.349
gpu_busy_ms_per_present 151.991 96.415 -55.576 -36.565

Top phases (ms per frame)

Metric Baseline Candidate Change Change (%)
Driver.Draw 90.597 85.879 -4.718 -5.208
Driver.Draw.shader_compile_and_link 53.222 51.299 -1.923 -3.613
Driver.Packet 520.917 465.854 -55.063 -10.570
Driver.Packet.dispatch n/a 43.309 n/a n/a
Driver.Packet.draw 91.749 87.031 -4.718 -5.142
Driver.Packet.memory_wait 298.770 274.814 -23.956 -8.018
Driver.Packet.prepare_memory 55.606 n/a n/a n/a
Graphics.Draw 83.471 86.515 +3.044 +3.647
Graphics.Draw.draw_and_resource_release 66.106 70.117 +4.011 +6.068
trace_digest.py, run 1 (main)

seconds 150:5 from present 2938: 29 presents, frame p50 174.5 / p90 183.4 / p99 189.2 / max 189.2 ms, GPU busy 152.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea52e5, dropped: no

{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2938,"ms":5090.897},"presents":29,"frame_ms":{"p50":174.458,"p90":183.441,"p99":189.159,"max":189.159},"gpu_busy_ms_per_present":152.25,"worker_busy_pct":{"queue worker 0x0":98.786,"queue worker 0x40":97.544,"queue worker 0x48":94.148,"queue worker 0x46":10.122},"top_phases_ms_per_frame":{"Driver.Packet":527.312,"Driver.Packet.memory_wait":302.26,"Driver.Packet.draw":91.258,"Driver.Draw":90.09,"Graphics.Draw":83.514,"Graphics.Draw.draw_and_resource_release":66.774,"Driver.Packet.prepare_memory":60.03,"Driver.Draw.shader_compile_and_link":55.787},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25288.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2959: 189.2 ms at 3678 ms: Driver.Packet (queue worker 0x40) 188.4, Driver.Packet (queue worker 0x48) 185.5, Driver.Packet.memory_wait (queue worker 0x48) 185.0, Driver.Packet (queue worker 0x0) 167.1
  • present 2963: 189.1 ms at 4378 ms: Driver.Packet (queue worker 0x40) 188.6, Driver.Packet (queue worker 0x48) 185.2, Driver.Packet.memory_wait (queue worker 0x48) 184.7, Driver.Packet (queue worker 0x0) 167.7
  • present 2945: 183.4 ms at 1238 ms: Driver.Packet (queue worker 0x40) 183.0, Driver.Packet (queue worker 0x48) 179.1, Driver.Packet.memory_wait (queue worker 0x48) 178.7, Driver.WorkerWait (queue worker 0x46) 177.8
  • present 2951: 183.0 ms at 2268 ms: Driver.Packet (queue worker 0x40) 182.6, Driver.Packet (queue worker 0x48) 176.9, Driver.Packet.memory_wait (queue worker 0x48) 176.4, Driver.WorkerWait (queue worker 0x46) 161.7
  • present 2941: 182.9 ms at 537 ms: Driver.Packet (queue worker 0x40) 182.4, Driver.Packet (queue worker 0x48) 178.8, Driver.Packet.memory_wait (queue worker 0x48) 178.3, Driver.Packet (queue worker 0x0) 161.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 134.8 (77 %) 18.8 (11 %) 22.0 123.5 Driver.Packet 153.4, Driver.EndSubmission 0.0
title 0.3 (0 %) 0.0 (0 %) 175.2 0.1 Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.1
title 1.2 (1 %) 0.0 (0 %) 174.4 0.9 Shader.ResolveGraphicsStagesAbi 1.2, Shader.ResolveAbi 0.0
title 0.8 (0 %) 0.0 (0 %) 174.7 0.3 Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1
title 0.8 (0 %) 0.0 (0 %) 174.7 0.9 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1
queue worker 0x40 13.8 (8 %) 157.1 (90 %) 4.7 2.1 Driver.Packet 170.8, Driver.EndSubmission 0.1
queue worker 0x48 0.5 (0 %) 168.9 (96 %) 6.2 0.2 Driver.Packet 165.1, Driver.EndSubmission 0.1
draw committer 74.2 (42 %) 7.1 (4 %) 94.2 37.1 Graphics.Draw 70.1, Recorder.Submit 3.4
presenter 1.1 (1 %) 1.8 (1 %) 172.7 0.0 VideoOut.Flip 2.8, Driver.Present 0.1
queue worker 0x46 0.8 (0 %) 169.3 (96 %) 5.4 0.8 Driver.Packet 17.5, Driver.EndSubmission 0.1
title 0.9 (0 %) 0.0 (0 %) 174.7 0.3 Shader.ResolveGraphicsStagesAbi 0.9
gpu 152.1 (87 %) 0.0 (0 %) 23.4 0.0 batch 152.1

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 506.8, Driver.Packet.memory_wait 302.3, Driver.WorkerWait 156.6, batch 152.1, Driver.WorkerWait.dequeue_order 144.8, Driver.Packet.draw 78.7, Driver.Draw 77.5, Graphics.Draw 70.5, Driver.Packet.prepare_memory 58.7, Graphics.Draw.draw_and_resource_release 56.9

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 284.1 ms at 4042 ms, present 2961
  • Driver.WorkerWait (queue worker 0x46) 282.2 ms at 1244 ms, present 2945
  • Driver.WorkerWait (queue worker 0x46) 210.3 ms at 3826 ms, present 2959
  • Driver.WorkerWait (queue worker 0x46) 202.4 ms at 1037 ms, present 2943
  • Driver.Packet.memory_wait (queue worker 0x48) 185.7 ms at 3685 ms, present 2959
  • Driver.WorkerWait (queue worker 0x46) 184.7 ms at 2205 ms, present 2950
  • Driver.Packet.memory_wait (queue worker 0x48) 184.3 ms at 4385 ms, present 2963
  • Driver.WorkerWait (queue worker 0x46) 182.7 ms at 2564 ms, present 2952
  • Driver.Packet.memory_wait (queue worker 0x48) 178.7 ms at 544 ms, present 2941
  • Driver.Packet.memory_wait (queue worker 0x48) 178.4 ms at 1246 ms, present 2945

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

  • batch 10: 20.3 ms at 17 ms, present 2938: GPU no ranges; recorded by Graphics.Draw (draw committer) 5.2, Graphics.Draw.draw_and_resource_release (draw committer) 4.5, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0
  • batch 1758: 20.3 ms at 2131 ms, present 2950: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.2, Graphics.Draw.draw_and_resource_release (draw committer) 3.6, Graphics.Draw.validate (draw committer) 0.1, Recorder.Submit (draw committer) 0.1
  • batch 880: 20.0 ms at 1091 ms, present 2944: GPU no ranges; recorded by Graphics.Draw (draw committer) 6.1, Graphics.Draw.draw_and_resource_release (draw committer) 5.4, Graphics.Draw.validate (draw committer) 0.1, Recorder.Submit (draw committer) 0.1
  • batch 1630: 19.9 ms at 1965 ms, present 2949: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.6, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0
  • batch 2031: 19.9 ms at 2495 ms, present 2952: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.5, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0
trace_digest.py, run 2 (this PR)

seconds 150:5 from present 2753: 33 presents, frame p50 155.3 / p90 164.0 / p99 165.2 / max 165.2 ms, GPU busy 96.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c514e, dropped: no

{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2753,"ms":5110.32},"presents":33,"frame_ms":{"p50":155.333,"p90":164.003,"p99":165.208,"max":165.208},"gpu_busy_ms_per_present":96.173,"worker_busy_pct":{"queue worker 0x0":98.684,"queue worker 0x40":97.781,"queue worker 0x48":94.318,"queue worker 0x46":11.173},"top_phases_ms_per_frame":{"Driver.Packet":467.172,"Driver.Packet.memory_wait":275.849,"Driver.Packet.draw":87.205,"Graphics.Draw":86.542,"Driver.Draw":86.075,"Graphics.Draw.draw_and_resource_release":69.994,"Driver.Draw.shader_compile_and_link":52.713,"Driver.Packet.dispatch":43.352},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-26736.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2756: 165.2 ms at 481 ms: Driver.Packet (queue worker 0x40) 164.7, Driver.Packet (queue worker 0x48) 161.9, Driver.Packet.memory_wait (queue worker 0x48) 161.5, Driver.Packet.memory_wait (queue worker 0x40) 145.9
  • present 2769: 164.6 ms at 2500 ms: Driver.Packet (queue worker 0x40) 164.0, Driver.Packet (queue worker 0x48) 160.2, Driver.Packet.memory_wait (queue worker 0x48) 159.8, Driver.WorkerWait (queue worker 0x46) 145.9
  • present 2783: 164.3 ms at 4627 ms: Driver.Packet (queue worker 0x40) 163.9, Driver.Packet (queue worker 0x48) 161.0, Driver.Packet.memory_wait (queue worker 0x48) 160.5, Driver.WorkerWait (queue worker 0x46) 145.7
  • present 2768: 164.0 ms at 2336 ms: Driver.Packet (queue worker 0x40) 163.6, Driver.Packet (queue worker 0x48) 159.2, Driver.Packet.memory_wait (queue worker 0x48) 158.7, Driver.WorkerWait (queue worker 0x46) 144.8
  • present 2771: 163.4 ms at 2818 ms: Driver.Packet (queue worker 0x40) 162.9, Driver.Packet (queue worker 0x48) 159.2, Driver.Packet.memory_wait (queue worker 0x48) 158.6, Driver.Packet.memory_wait (queue worker 0x40) 145.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 127.2 (82 %) 5.9 (4 %) 21.8 126.1 Driver.Packet 132.9, Driver.EndSubmission 0.1
title 0.3 (0 %) 0.0 (0 %) 154.5 0.1 Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.1
title 1.0 (1 %) 0.0 (0 %) 153.8 0.9 Shader.ResolveGraphicsStagesAbi 1.0, Shader.ResolveAbi 0.0
title 0.8 (1 %) 0.0 (0 %) 154.1 0.3 Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1
title 0.8 (1 %) 0.0 (0 %) 154.1 0.8 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1
queue worker 0x40 10.5 (7 %) 140.6 (91 %) 3.7 2.0 Driver.Packet 151.0, Driver.EndSubmission 0.1
queue worker 0x48 0.5 (0 %) 149.6 (97 %) 4.8 0.2 Driver.Packet 145.9, Driver.EndSubmission 0.1
draw committer 77.2 (50 %) 5.8 (4 %) 71.9 37.7 Graphics.Draw 73.0, Recorder.Submit 3.5
presenter 1.1 (1 %) 1.9 (1 %) 151.9 0.0 VideoOut.Flip 2.8, Driver.Present 0.1
queue worker 0x46 0.8 (0 %) 149.7 (97 %) 4.4 0.8 Driver.Packet 17.1, Driver.EndSubmission 0.0
title 0.7 (0 %) 0.0 (0 %) 154.1 0.3 Shader.ResolveGraphicsStagesAbi 0.7
gpu 96.2 (62 %) 0.0 (0 %) 58.6 0.0 batch 96.2

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 446.9, Driver.Packet.memory_wait 275.8, Driver.WorkerWait 137.4, Driver.WorkerWait.dequeue_order 128.4, batch 96.2, Driver.Packet.draw 74.6, Graphics.Draw 73.5, Driver.Draw 73.4, Graphics.Draw.draw_and_resource_release 59.9, Driver.Packet.dispatch 43.2

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x48) 160.7 ms at 488 ms, present 2756
  • Driver.Packet.memory_wait (queue worker 0x48) 159.5 ms at 2508 ms, present 2769
  • Driver.Packet.memory_wait (queue worker 0x48) 159.4 ms at 4634 ms, present 2783
  • Driver.Packet.memory_wait (queue worker 0x48) 158.7 ms at 2344 ms, present 2768
  • Driver.Packet.memory_wait (queue worker 0x48) 158.4 ms at 2825 ms, present 2771
  • Driver.Packet.memory_wait (queue worker 0x48) 157.9 ms at 169 ms, present 2754
  • Driver.Packet.memory_wait (queue worker 0x48) 155.8 ms at 8 ms, present 2753
  • Driver.Packet.memory_wait (queue worker 0x48) 154.0 ms at 4799 ms, present 2784
  • Driver.Packet.memory_wait (queue worker 0x48) 153.8 ms at 331 ms, present 2755
  • Driver.Packet.memory_wait (queue worker 0x48) 153.4 ms at 654 ms, present 2757

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

  • batch 2423: 16.6 ms at 2534 ms, present 2769: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2723: 16.5 ms at 2853 ms, present 2771: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 166: 16.3 ms at 195 ms, present 2754: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 3475: 16.3 ms at 3595 ms, present 2776: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 4815: 16.3 ms at 4984 ms, present 2785: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
trace_digest.py, run 3 (main)

seconds 150:5 from present 2660: 29 presents, frame p50 174.6 / p90 182.9 / p99 185.6 / max 185.6 ms, GPU busy 152.6 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea52e5, dropped: no

{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2660,"ms":5017.386},"presents":29,"frame_ms":{"p50":174.619,"p90":182.895,"p99":185.561,"max":185.561},"gpu_busy_ms_per_present":152.577,"worker_busy_pct":{"queue worker 0x0":98.804,"queue worker 0x40":97.803,"queue worker 0x48":93.909,"queue worker 0x46":9.464},"top_phases_ms_per_frame":{"Driver.Packet":518.59,"Driver.Packet.memory_wait":298.946,"Driver.Packet.draw":86.549,"Driver.Draw":85.458,"Graphics.Draw":81.895,"Driver.Packet.prepare_memory":65.5,"Graphics.Draw.draw_and_resource_release":65.075,"Driver.Draw.shader_compile_and_link":52.003},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-12684.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2688: 185.6 ms at 4832 ms: Driver.Packet (queue worker 0x0) 163.4, batch (gpu) 155.2, Driver.Packet (queue worker 0x40) 146.8, Driver.WorkerWait (queue worker 0x46) 105.3
  • present 2667: 183.3 ms at 1226 ms: Driver.Packet (queue worker 0x40) 182.5, Driver.Packet (queue worker 0x48) 179.1, Driver.Packet.memory_wait (queue worker 0x48) 178.7, batch (gpu) 163.1
  • present 2664: 182.9 ms at 703 ms: Driver.Packet (queue worker 0x40) 182.5, Driver.Packet (queue worker 0x48) 178.9, Driver.Packet.memory_wait (queue worker 0x48) 178.4, batch (gpu) 161.2
  • present 2687: 181.0 ms at 4651 ms: Driver.Packet (queue worker 0x40) 180.6, Driver.Packet (queue worker 0x48) 176.0, Driver.Packet.memory_wait (queue worker 0x48) 175.6, Driver.WorkerWait (queue worker 0x46) 160.5
  • present 2682: 179.9 ms at 3773 ms: Driver.Packet (queue worker 0x40) 179.3, Driver.Packet (queue worker 0x48) 174.9, Driver.Packet.memory_wait (queue worker 0x48) 174.3, Driver.WorkerWait (queue worker 0x46) 160.5

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 125.7 (73 %) 25.2 (15 %) 22.1 124.2 Driver.Packet 150.8, Driver.EndSubmission 0.1
title 0.3 (0 %) 0.0 (0 %) 172.7 0.1 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.0
title 1.1 (1 %) 0.0 (0 %) 171.9 0.9 Shader.ResolveGraphicsStagesAbi 1.1, Shader.ResolveAbi 0.0
title 0.8 (0 %) 0.0 (0 %) 172.2 0.4 Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1
title 0.8 (0 %) 0.0 (0 %) 172.2 0.8 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.2
queue worker 0x40 12.2 (7 %) 156.6 (91 %) 4.2 2.1 Driver.Packet 168.7, Driver.EndSubmission 0.1
queue worker 0x48 0.5 (0 %) 166.1 (96 %) 6.4 0.2 Driver.Packet 162.3, Driver.EndSubmission 0.1
draw committer 72.6 (42 %) 6.0 (3 %) 94.4 37.4 Graphics.Draw 68.5, Recorder.Submit 3.4
presenter 1.1 (1 %) 2.0 (1 %) 169.9 0.0 VideoOut.Flip 3.0, Driver.Present 0.1
queue worker 0x46 0.8 (0 %) 164.6 (95 %) 7.7 0.8 Driver.Packet 16.1, Driver.EndSubmission 0.1
title 0.8 (0 %) 0.0 (0 %) 172.2 0.3 Shader.ResolveGraphicsStagesAbi 0.8
gpu 152.4 (88 %) 0.0 (0 %) 20.6 0.0 batch 152.4

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 497.9, Driver.Packet.memory_wait 298.9, Driver.WorkerWait 153.5, batch 152.4, Driver.WorkerWait.dequeue_order 138.5, Driver.Packet.draw 73.7, Driver.Draw 72.6, Graphics.Draw 68.9, Driver.Packet.prepare_memory 64.2, Graphics.Draw.draw_and_resource_release 55.0

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 288.2 ms at 4303 ms, present 2685
  • Driver.WorkerWait (queue worker 0x46) 286.4 ms at 184 ms, present 2661
  • Driver.WorkerWait (queue worker 0x46) 255.3 ms at 3088 ms, present 2678
  • Driver.WorkerWait (queue worker 0x46) 240.4 ms at 1581 ms, present 2669
  • Driver.WorkerWait (queue worker 0x46) 210.4 ms at 4087 ms, present 2683
  • Driver.WorkerWait (queue worker 0x46) 204.7 ms at 1371 ms, present 2667
  • Driver.WorkerWait (queue worker 0x46) 201.0 ms at 2547 ms, present 2674
  • Driver.WorkerWait (queue worker 0x46) 193.6 ms at 2889 ms, present 2676
  • Driver.Packet.memory_wait (queue worker 0x48) 178.5 ms at 1233 ms, present 2667
  • Driver.Packet.memory_wait (queue worker 0x48) 178.1 ms at 710 ms, present 2664

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

  • batch 3988: 22.1 ms at 4878 ms, present 2688: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.7, Graphics.Draw.draw_and_resource_release (draw committer) 4.1, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0
  • batch 1459: 20.3 ms at 1780 ms, present 2670: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0
  • batch 1585: 20.3 ms at 1956 ms, present 2671: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.9, Graphics.Draw.draw_and_resource_release (draw committer) 4.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0
  • batch 2138: 20.2 ms at 2599 ms, present 2675: GPU no ranges; recorded by Graphics.Draw (draw committer) 5.5, Graphics.Draw.draw_and_resource_release (draw committer) 4.9, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0
  • batch 280: 20.1 ms at 368 ms, present 2662: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.8, Graphics.Draw.draw_and_resource_release (draw committer) 4.2, Recorder.Submit (draw committer) 0.1
trace_digest.py, run 4 (this PR)

seconds 150:5 from present 4310: 32 presents, frame p50 160.3 / p90 167.4 / p99 172.9 / max 172.9 ms, GPU busy 91.6 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c514e, dropped: no

{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":4310,"ms":5118.256},"presents":32,"frame_ms":{"p50":160.333,"p90":167.439,"p99":172.874,"max":172.874},"gpu_busy_ms_per_present":91.612,"worker_busy_pct":{"queue worker 0x0":98.652,"queue worker 0x40":97.934,"queue worker 0x48":94.517,"queue worker 0x46":9.894},"top_phases_ms_per_frame":{"Driver.Packet":481.041,"Driver.Packet.memory_wait":286.595,"Driver.Packet.draw":92.17,"Graphics.Draw":91.69,"Driver.Draw":90.991,"Graphics.Draw.draw_and_resource_release":75.211,"Driver.Draw.shader_compile_and_link":55.081,"Shader.DrawStage":44.516},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-3760.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 4324: 172.9 ms at 2235 ms: Driver.Packet (queue worker 0x40) 172.4, Driver.Packet (queue worker 0x48) 169.0, Driver.Packet.memory_wait (queue worker 0x48) 168.4, Driver.WorkerWait (queue worker 0x46) 154.6
  • present 4339: 172.5 ms at 4628 ms: Driver.Packet (queue worker 0x40) 172.1, Driver.Packet (queue worker 0x48) 169.0, Driver.Packet.memory_wait (queue worker 0x48) 168.5, Driver.WorkerWait (queue worker 0x46) 155.3
  • present 4319: 169.7 ms at 1411 ms: Driver.Packet (queue worker 0x40) 169.2, Driver.Packet (queue worker 0x48) 165.8, Driver.Packet.memory_wait (queue worker 0x48) 165.4, Driver.WorkerWait (queue worker 0x46) 149.5
  • present 4337: 167.4 ms at 4296 ms: Driver.Packet (queue worker 0x40) 167.0, Driver.Packet (queue worker 0x48) 163.0, Driver.Packet.memory_wait (queue worker 0x48) 162.5, Driver.WorkerWait (queue worker 0x46) 157.4
  • present 4323: 167.0 ms at 2068 ms: Driver.Packet (queue worker 0x40) 166.5, Driver.Packet (queue worker 0x48) 162.7, Driver.Packet.memory_wait (queue worker 0x48) 162.2, Driver.WorkerWait (queue worker 0x46) 149.8

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 132.5 (83 %) 5.7 (4 %) 21.7 125.6 Driver.Packet 138.1, Driver.EndSubmission 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 159.9 0.0 Vulkan.GraphicsPipelinePrebuild 0.0
title 0.4 (0 %) 0.0 (0 %) 159.6 0.1 Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.1
title 1.2 (1 %) 0.0 (0 %) 158.8 0.9 Shader.ResolveGraphicsStagesAbi 1.2, Shader.ResolveAbi 0.0
title 0.9 (1 %) 0.0 (0 %) 159.1 0.3 Shader.ResolveGraphicsStagesAbi 0.8, Shader.ResolveAbi 0.1
title 0.8 (1 %) 0.0 (0 %) 159.1 0.8 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1
queue worker 0x40 10.7 (7 %) 145.6 (91 %) 3.6 2.1 Driver.Packet 156.3, Driver.EndSubmission 0.1
queue worker 0x48 0.6 (0 %) 154.7 (97 %) 4.6 0.2 Driver.Packet 151.0, Driver.EndSubmission 0.1
draw committer 82.5 (52 %) 5.8 (4 %) 71.6 37.0 Graphics.Draw 78.3, Recorder.Submit 3.5
presenter 1.0 (1 %) 1.9 (1 %) 157.0 0.0 VideoOut.Flip 2.9, Driver.Present 0.0
queue worker 0x46 0.8 (0 %) 154.7 (97 %) 4.5 0.8 Driver.Packet 15.6, Driver.EndSubmission 0.0
title 0.8 (0 %) 0.0 (0 %) 159.2 0.3 Shader.ResolveGraphicsStagesAbi 0.8
gpu 94.7 (59 %) 0.0 (0 %) 65.3 0.0 batch 94.7

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 460.9, Driver.Packet.memory_wait 286.6, Driver.WorkerWait 144.0, Driver.WorkerWait.dequeue_order 134.5, batch 94.7, Driver.Packet.draw 79.7, Graphics.Draw 78.8, Driver.Draw 78.5, Graphics.Draw.draw_and_resource_release 65.5, Driver.Draw.shader_compile_and_link 44.4

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x48) 168.3 ms at 2242 ms, present 4324
  • Driver.Packet.memory_wait (queue worker 0x48) 168.2 ms at 4635 ms, present 4339
  • Driver.Packet.memory_wait (queue worker 0x48) 164.3 ms at 1418 ms, present 4319
  • Driver.Packet.memory_wait (queue worker 0x48) 162.3 ms at 4303 ms, present 4337
  • Driver.Packet.memory_wait (queue worker 0x48) 162.0 ms at 2076 ms, present 4323
  • Driver.Packet.memory_wait (queue worker 0x48) 161.6 ms at 1910 ms, present 4322
  • Driver.Packet.memory_wait (queue worker 0x48) 161.5 ms at 4808 ms, present 4340
  • Driver.Packet.memory_wait (queue worker 0x48) 159.6 ms at 4471 ms, present 4338
  • Driver.WorkerWait (queue worker 0x46) 159.3 ms at 4248 ms, present 4336
  • Driver.Packet.memory_wait (queue worker 0x48) 157.3 ms at 3982 ms, present 4335

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

  • batch 628: 16.3 ms at 654 ms, present 4314: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2168: 16.2 ms at 2270 ms, present 4324: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 1394: 16.0 ms at 1451 ms, present 4319: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2015: 15.8 ms at 2115 ms, present 4323: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 939: 15.8 ms at 969 ms, present 4316: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
trace_digest.py, run 5 (main)

seconds 150:5 from present 2658: 29 presents, frame p50 174.5 / p90 183.5 / p99 184.9 / max 184.9 ms, GPU busy 152.0 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea52e5, dropped: no

{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2658,"ms":5045.459},"presents":29,"frame_ms":{"p50":174.497,"p90":183.493,"p99":184.907,"max":184.907},"gpu_busy_ms_per_present":151.991,"worker_busy_pct":{"queue worker 0x0":98.787,"queue worker 0x40":97.445,"queue worker 0x48":94.411,"queue worker 0x46":9.031},"top_phases_ms_per_frame":{"Driver.Packet":520.917,"Driver.Packet.memory_wait":298.77,"Driver.Packet.draw":91.749,"Driver.Draw":90.597,"Graphics.Draw":83.471,"Graphics.Draw.draw_and_resource_release":66.106,"Driver.Packet.prepare_memory":55.606,"Driver.Draw.shader_compile_and_link":53.222},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25028.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2675: 184.9 ms at 2951 ms: Driver.Packet (queue worker 0x40) 184.5, Driver.Packet (queue worker 0x48) 180.7, Driver.Packet.memory_wait (queue worker 0x48) 180.2, Driver.WorkerWait (queue worker 0x46) 163.7
  • present 2660: 184.2 ms at 356 ms: Driver.Packet (queue worker 0x40) 183.8, Driver.Packet (queue worker 0x48) 180.1, Driver.Packet.memory_wait (queue worker 0x48) 179.5, Driver.WorkerWait (queue worker 0x46) 162.9
  • present 2674: 183.5 ms at 2767 ms: Driver.Packet (queue worker 0x40) 183.1, Driver.Packet (queue worker 0x48) 179.2, Driver.Packet.memory_wait (queue worker 0x48) 178.4, Driver.WorkerWait (queue worker 0x46) 163.6
  • present 2658: 183.2 ms at 0 ms: Driver.Packet (queue worker 0x48) 176.4, Driver.Packet.memory_wait (queue worker 0x48) 175.9, Driver.Packet (queue worker 0x0) 161.4, batch (gpu) 156.7
  • present 2666: 181.9 ms at 1398 ms: Driver.Packet (queue worker 0x40) 181.4, Driver.Packet (queue worker 0x48) 177.5, Driver.Packet.memory_wait (queue worker 0x48) 177.0, Driver.WorkerWait (queue worker 0x46) 176.3

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 134.4 (77 %) 17.6 (10 %) 22.0 125.2 Driver.Packet 151.8, Driver.EndSubmission 0.0
title 0.3 (0 %) 0.0 (0 %) 173.7 0.1 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.0
title 1.2 (1 %) 0.0 (0 %) 172.8 0.9 Shader.ResolveGraphicsStagesAbi 1.1, Shader.ResolveAbi 0.0
title 0.9 (1 %) 0.0 (0 %) 173.1 0.3 Shader.ResolveGraphicsStagesAbi 0.8, Shader.ResolveAbi 0.1
title 0.8 (0 %) 0.0 (0 %) 173.2 0.8 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.2
queue worker 0x40 15.9 (9 %) 153.3 (88 %) 4.8 2.1 Driver.Packet 169.0, Driver.EndSubmission 0.2
queue worker 0x48 0.5 (0 %) 168.1 (97 %) 5.4 0.2 Driver.Packet 164.1, Driver.EndSubmission 0.1
draw committer 74.3 (43 %) 9.1 (5 %) 90.6 37.5 Graphics.Draw 70.1, Recorder.Submit 3.5
presenter 1.0 (1 %) 1.9 (1 %) 171.1 0.0 VideoOut.Flip 2.8, Driver.Present 0.1
queue worker 0x46 0.9 (0 %) 167.5 (96 %) 5.6 0.8 Driver.Packet 15.5, Driver.EndSubmission 0.1
title 0.8 (0 %) 0.0 (0 %) 173.2 0.3 Shader.ResolveGraphicsStagesAbi 0.8
gpu 151.0 (87 %) 0.0 (0 %) 23.0 0.0 batch 151.0

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 500.3, Driver.Packet.memory_wait 298.8, Driver.WorkerWait 157.2, batch 151.0, Driver.WorkerWait.dequeue_order 143.9, Driver.Packet.draw 79.0, Driver.Draw 77.9, Graphics.Draw 70.5, Graphics.Draw.draw_and_resource_release 56.1, Driver.Packet.prepare_memory 54.3

Longest waits

  • Driver.WorkerWait (queue worker 0x46) 283.8 ms at 1916 ms, present 2669
  • Driver.WorkerWait (queue worker 0x46) 281.0 ms at 880 ms, present 2663
  • Driver.WorkerWait (queue worker 0x46) 277.4 ms at 1404 ms, present 2666
  • Driver.WorkerWait (queue worker 0x46) 212.6 ms at 661 ms, present 2661
  • Driver.WorkerWait (queue worker 0x46) 208.1 ms at 1190 ms, present 2664
  • Driver.WorkerWait (queue worker 0x46) 202.2 ms at 1709 ms, present 2667
  • Driver.Packet.memory_wait (queue worker 0x48) 179.4 ms at 363 ms, present 2660
  • Driver.Packet.memory_wait (queue worker 0x48) 179.0 ms at 2775 ms, present 2674
  • Driver.Packet.memory_wait (queue worker 0x48) 178.7 ms at 2959 ms, present 2675
  • Driver.Packet.memory_wait (queue worker 0x48) 178.0 ms at 7 ms, present 2658

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

  • batch 1017: 21.4 ms at 1246 ms, present 2665: GPU no ranges; recorded by Graphics.Draw (draw committer) 5.3, Graphics.Draw.draw_and_resource_release (draw committer) 4.7, Recorder.Submit (draw committer) 0.0
  • batch 589: 21.1 ms at 743 ms, present 2662: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.3, Recorder.Submit (draw committer) 0.0
  • batch 1174: 20.6 ms at 1447 ms, present 2666: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.6, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0
  • batch 1751: 20.2 ms at 2120 ms, present 2670: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.3, Graphics.Draw.draw_and_resource_release (draw committer) 3.6, Recorder.Submit (draw committer) 0.1
  • batch 2481: 19.8 ms at 2998 ms, present 2675: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.3, Graphics.Draw.draw_and_resource_release (draw committer) 3.7, Graphics.Draw.validate (draw committer) 0.0, Recorder.Submit (draw committer) 0.0
trace_digest.py, run 6 (this PR)

seconds 150:5 from present 2779: 33 presents, frame p50 152.8 / p90 161.1 / p99 166.5 / max 166.5 ms, GPU busy 96.4 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c514e, dropped: no

{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2779,"ms":5089.771},"presents":33,"frame_ms":{"p50":152.754,"p90":161.061,"p99":166.455,"max":166.455},"gpu_busy_ms_per_present":96.415,"worker_busy_pct":{"queue worker 0x0":98.647,"queue worker 0x40":97.92,"queue worker 0x48":94.465,"queue worker 0x46":11.271},"top_phases_ms_per_frame":{"Driver.Packet":465.854,"Driver.Packet.memory_wait":274.814,"Driver.Packet.draw":87.031,"Graphics.Draw":86.515,"Driver.Draw":85.879,"Graphics.Draw.draw_and_resource_release":70.117,"Driver.Draw.shader_compile_and_link":51.299,"Driver.Packet.dispatch":43.309},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-27560.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2803: 166.5 ms at 3719 ms: Driver.Packet (queue worker 0x40) 165.8, Driver.Packet (queue worker 0x48) 162.2, Driver.Packet.memory_wait (queue worker 0x48) 161.7, Driver.WorkerWait (queue worker 0x46) 146.5
  • present 2804: 164.9 ms at 3885 ms: Driver.Packet (queue worker 0x40) 164.5, Driver.Packet (queue worker 0x48) 160.3, Driver.Packet.memory_wait (queue worker 0x48) 159.6, Driver.WorkerWait (queue worker 0x46) 146.1
  • present 2788: 163.4 ms at 1405 ms: Driver.Packet (queue worker 0x40) 162.9, Driver.Packet (queue worker 0x48) 159.4, Driver.Packet.memory_wait (queue worker 0x48) 158.9, Driver.WorkerWait (queue worker 0x46) 144.5
  • present 2785: 161.1 ms at 924 ms: Driver.Packet (queue worker 0x40) 160.6, Driver.Packet (queue worker 0x48) 155.8, Driver.Packet.memory_wait (queue worker 0x48) 155.4, Driver.WorkerWait (queue worker 0x46) 143.1
  • present 2783: 160.7 ms at 604 ms: Driver.Packet (queue worker 0x40) 160.2, Driver.Packet (queue worker 0x48) 155.9, Driver.Packet.memory_wait (queue worker 0x48) 155.2, Driver.WorkerWait (queue worker 0x46) 144.3

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 126.3 (82 %) 5.9 (4 %) 22.0 125.9 Driver.Packet 132.0, Driver.EndSubmission 0.1
title 0.3 (0 %) 0.0 (0 %) 154.0 0.1 Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.1
title 1.0 (1 %) 0.0 (0 %) 153.2 0.9 Shader.ResolveGraphicsStagesAbi 1.0, Shader.ResolveAbi 0.0
title 0.8 (1 %) 0.0 (0 %) 153.5 0.4 Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1
title 0.7 (0 %) 0.0 (0 %) 153.5 0.8 Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1
queue worker 0x40 11.0 (7 %) 139.7 (91 %) 3.5 2.1 Driver.Packet 150.6, Driver.EndSubmission 0.1
queue worker 0x48 0.5 (0 %) 149.2 (97 %) 4.6 0.2 Driver.Packet 145.5, Driver.EndSubmission 0.1
draw committer 76.8 (50 %) 6.4 (4 %) 71.1 38.1 Graphics.Draw 72.6, Recorder.Submit 3.5
presenter 1.0 (1 %) 1.8 (1 %) 151.4 0.1 VideoOut.Flip 2.8, Driver.Present 0.1
queue worker 0x46 0.8 (1 %) 149.1 (97 %) 4.3 0.8 Driver.Packet 17.2, Driver.EndSubmission 0.1
title 0.7 (0 %) 0.0 (0 %) 153.5 0.3 Shader.ResolveGraphicsStagesAbi 0.7
gpu 96.5 (63 %) 0.0 (0 %) 57.8 0.0 batch 96.5

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 445.3, Driver.Packet.memory_wait 274.8, Driver.WorkerWait 136.7, Driver.WorkerWait.dequeue_order 127.8, batch 96.5, Driver.Packet.draw 74.1, Graphics.Draw 73.1, Driver.Draw 72.8, Graphics.Draw.draw_and_resource_release 60.0, Driver.Packet.dispatch 43.1

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x48) 161.2 ms at 3726 ms, present 2803
  • Driver.Packet.memory_wait (queue worker 0x48) 159.8 ms at 3893 ms, present 2804
  • Driver.Packet.memory_wait (queue worker 0x48) 159.3 ms at 1412 ms, present 2788
  • Driver.Packet.memory_wait (queue worker 0x48) 156.6 ms at 1251 ms, present 2787
  • Driver.Packet.memory_wait (queue worker 0x48) 155.5 ms at 932 ms, present 2785
  • Driver.Packet.memory_wait (queue worker 0x48) 155.0 ms at 612 ms, present 2783
  • Driver.Packet.memory_wait (queue worker 0x48) 154.5 ms at 1093 ms, present 2786
  • Driver.Packet.memory_wait (queue worker 0x48) 154.4 ms at 772 ms, present 2784
  • Driver.Packet.memory_wait (queue worker 0x48) 154.3 ms at 3252 ms, present 2800
  • Driver.Packet.memory_wait (queue worker 0x48) 152.7 ms at 8 ms, present 2779

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

  • batch 3776: 16.1 ms at 3920 ms, present 2804: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 3020: 16.0 ms at 3120 ms, present 2799: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 2273: 16.0 ms at 2349 ms, present 2794: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.1
  • batch 3626: 16.0 ms at 3759 ms, present 2803: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0
  • batch 4230: 16.0 ms at 4371 ms, present 2807: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.1

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 616.64, Windows 11 (10.0.26200); AMD Radeon 860M (RADV, Mesa 26.2.5, Fedora 44), the focused tests with and without the validation layer, run by Lander0606 (the BAR path is taken): https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6364834002
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4965212000 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712). Originally posted by [panicDa3m0n](https://github.com/panicDa3m0n) on 2026-10-22T09:32:31Z. --- ### What **Summary.** Draw snapshots of read-only storage buffers and vertex copies go to resizable BAR memory when the device exposes one, and stay in host memory otherwise or with `APS5_NO_BAR_SNAPSHOTS=1`; index copies stay in host memory. On an RTX 4070 Ti SUPER at Astro Bot's Crash Site, three alternating rounds against `main` 8499ea52e give a frame p50 of 152.8-160.3 ms instead of 174.5-174.6 ms, and GPU time per present of 91.6-96.4 ms instead of about 152 ms. New tests cover the memory choice, the index copies and the mapped-buffer fallbacks, and each fails on a deliberate mistake. Draw snapshots of read-only storage buffers and the vertex copies of draws now live in device-local host-visible memory when the device exposes a resizable BAR over its device-local heap (a host-visible device-local type on a heap of at least 4 GiB), and in host memory otherwise. The CPU still fills them with `memcpy`, but the GPU reads them from VRAM instead of over PCIe. Index copies stay in host memory: the CPU scans them for the highest index and the mesh restart table, and those scans read the same copy the draw binds. The CPU never reads BAR memory back on the draw path: refreshing a stale snapshot rewrites its changed blocks without comparing them. `APS5_NO_BAR_SNAPSHOTS=1` keeps the snapshots and vertex copies in host memory as before. A mapped device-local `Buffer` takes host memory in three cases: - when none of the types in its `memoryTypeBits` is mapped device-local, since Vulkan reports the supported types per resource and they may exclude the BAR type the device lists; - when the reported budget of the device-local heap has no room for it, as `DeviceMemoryType` places device buffers; - when its allocation, or that of its slab block, is still refused after the pool trim and the cache reclaim, as device buffers and images do through `RefusedDeviceMemoryFallback`. `Properties()` then reports host memory, so refreshing such a snapshot compares its blocks again. The kept snapshots stay within the existing budgets: 1 GiB for storage snapshots and 1 GiB for draw inputs. Why: on an RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16) shaders read host memory at 6-8 GB/s sequentially and 1.4 GB/s scattered, against 650 and 92 GB/s from VRAM. Tests: - `snapshotMemoryTests` in `tests/Graphics.cpp` checks the choice of memory: - a BAR over the whole device heap is taken; - the switch keeps host memory; - a 256 MiB BAR window is not taken; - a device without host-visible device memory keeps host snapshots. - `agc_draw_input_memory` copies indices, stores to the guest source, and checks that the copy is in host memory and keeps its highest index. - `MappedDevicePlacement` in `tests/BufferPool.cpp` places a mapped device-local buffer and a slab within the budget, over it, after a refused allocation, and with the BAR type excluded from their `memoryTypeBits`, with and without `VK_EXT_memory_budget`. Related: - #8756 binds a kept snapshot at an offset, which works the same in BAR memory. The two change neighbouring lines of `PrepareDrawBindings`, so the second to land needs a small rebase. - #6553 (draft) adds `Context::HeapFits` for the budget check that `DeviceMemoryType` and `MappedBufferProperties` both write inline, and takes a host type only when its heap has room. Whichever of the two lands second can use it in `MappedBufferProperties` and `RefusedMappedMemoryFallback`. - #9875 copies only the vertex records a draw fetches. It changes the same line of `CopyDrawInput` as this pull request: this one picks the copy's memory, #9875 the bytes it reads. Merged together they conflict there, in `CMakeLists.txt` and in `tests/Recorder.cpp`, and the second to land keeps both. - #6044 converts CTest registrations to `add_library_test`. If it lands first, `agc_draw_input_memory` moves to that helper and the Depends line below names it. - The existing `verifySnapshots` check reads snapshots back on the CPU. With this change that read is uncached on device memory, slower but still correct. ### Tested Windows 11 (10.0.26200), NVIDIA GeForce RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16), i7-11700K, 32 GB; Astro Bot (PPSA21567, 01.019.000) at Crash Site with its default settings, 3840x2160. `main` below is 8499ea52e, the base of this PR. - Each new check fails when the code it covers is changed, and passes on the head: - `snapshotMemoryTests`, without the heap-size check of `SnapshotMemoryProperties`: `a 256 MiB BAR window was taken`. This ran on b5b8d4e27, which has the same check and test. - `agc_draw_input_memory`, with index copies in snapshot memory: `an index copy left host memory, so its highest index would be scanned from the guest instead of the copy`. - `agc_buffer_pool` (`MappedDevicePlacement`): - without the budget placement: `a mapped device-local buffer over the device-local budget was not placed in host memory`; - without the refused-memory fallback of `Buffer`: the refused allocation throws (`vkAllocateMemory buffer ... Vulkan result -2`); - without the fallback of its slabs: the refused slab block throws (`vkAllocateMemory buffer slab ... Vulkan result -2`); - with the budget check given the slab's size instead of its block's: `a mapped device-local slab whose block exceeds the device-local budget was not placed in host memory`; - with the memory type check moved back after the early return taken without `VK_EXT_memory_budget`: the buffer whose mask excludes the BAR type throws (`AGC graphics: required Vulkan memory type is unavailable`); - with the throwing `MemoryType` lookup in place of the mask check: the same throw with the budget extension. - `ctest -R ^agc_` on this PR's head (895 tests): all pass except four, and three skip on this device (sparse host import, dma-buf import, stencil reference export). - `agc_driver_sample_order`, `agc_driver_sample_order_grid_reference` and `agc_driver_sample_order_recipe_depth_locations` fail the same way on `main`'s build at 3ca07d086 on this machine ("the slopes did not leave depth both at and below the clear value"). - `agc_compute_pipeline_capture_optional_byte_cap` timed out in the parallel run: it writes 256 MiB to this machine's slow temporary folder. - Khronos validation layer 1.4.363.0, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`: - The tests are the draw, vertex, index and snapshot tests (`agc_driver_draw_*`, `agc_driver_vertex_*`, `agc_driver_rect_list_*`, `agc_driver_mesh_index_cache`, `agc_driver_graphics`, `agc_driver_zero_stride_vertex_fetch`), plus `agc_draw_input_memory` on the head. - They ran on `main`'s build at 8499ea52e (26 tests), on this PR's head (27) and on the head with `APS5_NO_BAR_SNAPSHOTS=1` (27). - In all three runs every test passes, and no log has a `VUID-` error or a `was not found but was requested by env var VK_INSTANCE_LAYERS` line. - Each log has the same 10 warnings: 9 `Undefined-Value-ShaderOutputNotConsumed-DynamicRendering` and 1 `Undefined-Value-ShaderOutputNotConsumed`. - Performance, captured as the Performance report form describes: - **Capture.** Each run uses `APS5_TRACE_SECONDS=150:5` and no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch, with warm shader caches. Builds alternate `main` and this PR in one session. - **Log.** Every run's stdout and stderr went to files through the launcher (`Start-Process -RedirectStandardOutput`), the same for all runs. - **Import budget.** Both sides ran with `APS5_HOST_IMPORT_MIB=13312`. On this 32 GB machine the default host import budget is 8149 MiB, below what Crash Site's largest heaps need, so they fall back to copies. #6472 set that budget; #7844 changes it. - **Windows.** The windows are time-based because the number of presents before Crash Site varies between runs. For the same reason `performance_compare.py` lists `window.first_present` as the only configuration difference. The absolute times include the trace's own cost. Over the three rounds, frame p50 goes from 174.5-174.6 ms on `main` to 152.8-160.3 ms with this PR (−19.2, −14.3 and −21.7 ms per round), and GPU busy time per present from 152.0-152.6 ms to 91.6-96.4 ms. Index copies in host memory account for about 12-15 ms of GPU time per present against the first version of this PR, which kept them in BAR memory (83.5-88.1 ms against 98.3-99.7 ms, both on d6eafa54d). | Run | Build | Commit | Frame p50 / p90 / p99 (ms) | GPU busy per present (ms) | Busiest queue workers (%) | |---|---|---|---|---|---| | 1 | main | `8499ea52e` | 174.5 / 183.4 / 189.2 | 152.2 | 99, 98, 94 | | 2 | this PR | `b8663c514` | 155.3 / 164.0 / 165.2 | 96.2 | 99, 98, 94 | | 3 | main | `8499ea52e` | 174.6 / 182.9 / 185.6 | 152.6 | 99, 98, 94 | | 4 | this PR | `b8663c514` | 160.3 / 167.4 / 172.9 | 91.6 | 99, 98, 95 | | 5 | main | `8499ea52e` | 174.5 / 183.5 / 184.9 | 152.0 | 99, 97, 94 | | 6 | this PR | `b8663c514` | 152.8 / 161.1 / 166.5 | 96.4 | 99, 98, 94 | Summary lines, in run order: ```json {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2938,"ms":5090.897},"presents":29,"frame_ms":{"p50":174.458,"p90":183.441,"p99":189.159,"max":189.159},"gpu_busy_ms_per_present":152.250,"worker_busy_pct":{"queue worker 0x0":98.786,"queue worker 0x40":97.544,"queue worker 0x48":94.148,"queue worker 0x46":10.122},"top_phases_ms_per_frame":{"Driver.Packet":527.312,"Driver.Packet.memory_wait":302.260,"Driver.Packet.draw":91.258,"Driver.Draw":90.090,"Graphics.Draw":83.514,"Graphics.Draw.draw_and_resource_release":66.774,"Driver.Packet.prepare_memory":60.030,"Driver.Draw.shader_compile_and_link":55.787},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25288.json.gz"} {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2753,"ms":5110.320},"presents":33,"frame_ms":{"p50":155.333,"p90":164.003,"p99":165.208,"max":165.208},"gpu_busy_ms_per_present":96.173,"worker_busy_pct":{"queue worker 0x0":98.684,"queue worker 0x40":97.781,"queue worker 0x48":94.318,"queue worker 0x46":11.173},"top_phases_ms_per_frame":{"Driver.Packet":467.172,"Driver.Packet.memory_wait":275.849,"Driver.Packet.draw":87.205,"Graphics.Draw":86.542,"Driver.Draw":86.075,"Graphics.Draw.draw_and_resource_release":69.994,"Driver.Draw.shader_compile_and_link":52.713,"Driver.Packet.dispatch":43.352},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-26736.json.gz"} {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2660,"ms":5017.386},"presents":29,"frame_ms":{"p50":174.619,"p90":182.895,"p99":185.561,"max":185.561},"gpu_busy_ms_per_present":152.577,"worker_busy_pct":{"queue worker 0x0":98.804,"queue worker 0x40":97.803,"queue worker 0x48":93.909,"queue worker 0x46":9.464},"top_phases_ms_per_frame":{"Driver.Packet":518.590,"Driver.Packet.memory_wait":298.946,"Driver.Packet.draw":86.549,"Driver.Draw":85.458,"Graphics.Draw":81.895,"Driver.Packet.prepare_memory":65.500,"Graphics.Draw.draw_and_resource_release":65.075,"Driver.Draw.shader_compile_and_link":52.003},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-12684.json.gz"} {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":4310,"ms":5118.256},"presents":32,"frame_ms":{"p50":160.333,"p90":167.439,"p99":172.874,"max":172.874},"gpu_busy_ms_per_present":91.612,"worker_busy_pct":{"queue worker 0x0":98.652,"queue worker 0x40":97.934,"queue worker 0x48":94.517,"queue worker 0x46":9.894},"top_phases_ms_per_frame":{"Driver.Packet":481.041,"Driver.Packet.memory_wait":286.595,"Driver.Packet.draw":92.170,"Graphics.Draw":91.690,"Driver.Draw":90.991,"Graphics.Draw.draw_and_resource_release":75.211,"Driver.Draw.shader_compile_and_link":55.081,"Shader.DrawStage":44.516},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-3760.json.gz"} {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2658,"ms":5045.459},"presents":29,"frame_ms":{"p50":174.497,"p90":183.493,"p99":184.907,"max":184.907},"gpu_busy_ms_per_present":151.991,"worker_busy_pct":{"queue worker 0x0":98.787,"queue worker 0x40":97.445,"queue worker 0x48":94.411,"queue worker 0x46":9.031},"top_phases_ms_per_frame":{"Driver.Packet":520.917,"Driver.Packet.memory_wait":298.770,"Driver.Packet.draw":91.749,"Driver.Draw":90.597,"Graphics.Draw":83.471,"Graphics.Draw.draw_and_resource_release":66.106,"Driver.Packet.prepare_memory":55.606,"Driver.Draw.shader_compile_and_link":53.222},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25028.json.gz"} {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2779,"ms":5089.771},"presents":33,"frame_ms":{"p50":152.754,"p90":161.061,"p99":166.455,"max":166.455},"gpu_busy_ms_per_present":96.415,"worker_busy_pct":{"queue worker 0x0":98.647,"queue worker 0x40":97.920,"queue worker 0x48":94.465,"queue worker 0x46":11.271},"top_phases_ms_per_frame":{"Driver.Packet":465.854,"Driver.Packet.memory_wait":274.814,"Driver.Packet.draw":87.031,"Graphics.Draw":86.515,"Driver.Draw":85.879,"Graphics.Draw.draw_and_resource_release":70.117,"Driver.Draw.shader_compile_and_link":51.299,"Driver.Packet.dispatch":43.309},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-27560.json.gz"} ``` <details><summary>performance_compare.py, round 1</summary> # Performance comparison | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | 8499ea52e571 | aps5-trace-8499ea52e571-25288.json.gz | 29 | 5090.897 | | candidate | b8663c514ef5 | aps5-trace-b8663c514ef5-26736.json.gz | 33 | 5110.320 | - Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - Recorded configuration differs; these measurements do not isolate the code change. ## Configuration differences | Setting | Baseline | Candidate | | --- | --- | --- | | window.first_present | 2938 | 2753 | ## Frame and GPU times (ms) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 174.458 | 155.333 | -19.125 | -10.963 | | frame_ms.p90 | 183.441 | 164.003 | -19.438 | -10.596 | | frame_ms.p99 | 189.159 | 165.208 | -23.951 | -12.662 | | frame_ms.max | 189.159 | 165.208 | -23.951 | -12.662 | | mean_frame_ms | 175.548 | 154.858 | -20.690 | -11.786 | | gpu_busy_ms_per_present | 152.250 | 96.173 | -56.077 | -36.832 | ## Top phases (ms per frame) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Draw | 90.090 | 86.075 | -4.015 | -4.457 | | Driver.Draw.shader_compile_and_link | 55.787 | 52.713 | -3.074 | -5.510 | | Driver.Packet | 527.312 | 467.172 | -60.140 | -11.405 | | Driver.Packet.dispatch | n/a | 43.352 | n/a | n/a | | Driver.Packet.draw | 91.258 | 87.205 | -4.053 | -4.441 | | Driver.Packet.memory_wait | 302.260 | 275.849 | -26.411 | -8.738 | | Driver.Packet.prepare_memory | 60.030 | n/a | n/a | n/a | | Graphics.Draw | 83.514 | 86.542 | +3.028 | +3.626 | | Graphics.Draw.draw_and_resource_release | 66.774 | 69.994 | +3.220 | +4.822 | </details> <details><summary>performance_compare.py, round 2</summary> # Performance comparison | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | 8499ea52e571 | aps5-trace-8499ea52e571-12684.json.gz | 29 | 5017.386 | | candidate | b8663c514ef5 | aps5-trace-b8663c514ef5-3760.json.gz | 32 | 5118.256 | - Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - Recorded configuration differs; these measurements do not isolate the code change. ## Configuration differences | Setting | Baseline | Candidate | | --- | --- | --- | | window.first_present | 2660 | 4310 | ## Frame and GPU times (ms) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 174.619 | 160.333 | -14.286 | -8.181 | | frame_ms.p90 | 182.895 | 167.439 | -15.456 | -8.451 | | frame_ms.p99 | 185.561 | 172.874 | -12.687 | -6.837 | | frame_ms.max | 185.561 | 172.874 | -12.687 | -6.837 | | mean_frame_ms | 173.013 | 159.946 | -13.068 | -7.553 | | gpu_busy_ms_per_present | 152.577 | 91.612 | -60.965 | -39.957 | ## Top phases (ms per frame) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Draw | 85.458 | 90.991 | +5.533 | +6.475 | | Driver.Draw.shader_compile_and_link | 52.003 | 55.081 | +3.078 | +5.919 | | Driver.Packet | 518.590 | 481.041 | -37.549 | -7.241 | | Driver.Packet.draw | 86.549 | 92.170 | +5.621 | +6.495 | | Driver.Packet.memory_wait | 298.946 | 286.595 | -12.351 | -4.132 | | Driver.Packet.prepare_memory | 65.500 | n/a | n/a | n/a | | Graphics.Draw | 81.895 | 91.690 | +9.795 | +11.960 | | Graphics.Draw.draw_and_resource_release | 65.075 | 75.211 | +10.136 | +15.576 | | Shader.DrawStage | n/a | 44.516 | n/a | n/a | </details> <details><summary>performance_compare.py, round 3</summary> # Performance comparison | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | 8499ea52e571 | aps5-trace-8499ea52e571-25028.json.gz | 29 | 5045.459 | | candidate | b8663c514ef5 | aps5-trace-b8663c514ef5-27560.json.gz | 33 | 5089.771 | - Compare captures from the same machine, title, content version and scene; matching recorded metadata cannot verify the physical machine or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. - Recorded configuration differs; these measurements do not isolate the code change. ## Configuration differences | Setting | Baseline | Candidate | | --- | --- | --- | | window.first_present | 2658 | 2779 | ## Frame and GPU times (ms) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 174.497 | 152.754 | -21.743 | -12.460 | | frame_ms.p90 | 183.493 | 161.061 | -22.432 | -12.225 | | frame_ms.p99 | 184.907 | 166.455 | -18.452 | -9.979 | | frame_ms.max | 184.907 | 166.455 | -18.452 | -9.979 | | mean_frame_ms | 173.981 | 154.235 | -19.746 | -11.349 | | gpu_busy_ms_per_present | 151.991 | 96.415 | -55.576 | -36.565 | ## Top phases (ms per frame) | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Draw | 90.597 | 85.879 | -4.718 | -5.208 | | Driver.Draw.shader_compile_and_link | 53.222 | 51.299 | -1.923 | -3.613 | | Driver.Packet | 520.917 | 465.854 | -55.063 | -10.570 | | Driver.Packet.dispatch | n/a | 43.309 | n/a | n/a | | Driver.Packet.draw | 91.749 | 87.031 | -4.718 | -5.142 | | Driver.Packet.memory_wait | 298.770 | 274.814 | -23.956 | -8.018 | | Driver.Packet.prepare_memory | 55.606 | n/a | n/a | n/a | | Graphics.Draw | 83.471 | 86.515 | +3.044 | +3.647 | | Graphics.Draw.draw_and_resource_release | 66.106 | 70.117 | +4.011 | +6.068 | </details> <details><summary>trace_digest.py, run 1 (main)</summary> **seconds 150:5** from present 2938: 29 presents, frame p50 174.5 / p90 183.4 / p99 189.2 / max 189.2 ms, GPU busy 152.2 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea52e571, dropped: no ```json {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2938,"ms":5090.897},"presents":29,"frame_ms":{"p50":174.458,"p90":183.441,"p99":189.159,"max":189.159},"gpu_busy_ms_per_present":152.25,"worker_busy_pct":{"queue worker 0x0":98.786,"queue worker 0x40":97.544,"queue worker 0x48":94.148,"queue worker 0x46":10.122},"top_phases_ms_per_frame":{"Driver.Packet":527.312,"Driver.Packet.memory_wait":302.26,"Driver.Packet.draw":91.258,"Driver.Draw":90.09,"Graphics.Draw":83.514,"Graphics.Draw.draw_and_resource_release":66.774,"Driver.Packet.prepare_memory":60.03,"Driver.Draw.shader_compile_and_link":55.787},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25288.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2959: 189.2 ms at 3678 ms: Driver.Packet (queue worker 0x40) 188.4, Driver.Packet (queue worker 0x48) 185.5, Driver.Packet.memory_wait (queue worker 0x48) 185.0, Driver.Packet (queue worker 0x0) 167.1 - present 2963: 189.1 ms at 4378 ms: Driver.Packet (queue worker 0x40) 188.6, Driver.Packet (queue worker 0x48) 185.2, Driver.Packet.memory_wait (queue worker 0x48) 184.7, Driver.Packet (queue worker 0x0) 167.7 - present 2945: 183.4 ms at 1238 ms: Driver.Packet (queue worker 0x40) 183.0, Driver.Packet (queue worker 0x48) 179.1, Driver.Packet.memory_wait (queue worker 0x48) 178.7, Driver.WorkerWait (queue worker 0x46) 177.8 - present 2951: 183.0 ms at 2268 ms: Driver.Packet (queue worker 0x40) 182.6, Driver.Packet (queue worker 0x48) 176.9, Driver.Packet.memory_wait (queue worker 0x48) 176.4, Driver.WorkerWait (queue worker 0x46) 161.7 - present 2941: 182.9 ms at 537 ms: Driver.Packet (queue worker 0x40) 182.4, Driver.Packet (queue worker 0x48) 178.8, Driver.Packet.memory_wait (queue worker 0x48) 178.3, Driver.Packet (queue worker 0x0) 161.5 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 134.8 (77 %) | 18.8 (11 %) | 22.0 | 123.5 | Driver.Packet 153.4, Driver.EndSubmission 0.0 | | title | 0.3 (0 %) | 0.0 (0 %) | 175.2 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.1 | | title | 1.2 (1 %) | 0.0 (0 %) | 174.4 | 0.9 | Shader.ResolveGraphicsStagesAbi 1.2, Shader.ResolveAbi 0.0 | | title | 0.8 (0 %) | 0.0 (0 %) | 174.7 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1 | | title | 0.8 (0 %) | 0.0 (0 %) | 174.7 | 0.9 | Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1 | | queue worker 0x40 | 13.8 (8 %) | 157.1 (90 %) | 4.7 | 2.1 | Driver.Packet 170.8, Driver.EndSubmission 0.1 | | queue worker 0x48 | 0.5 (0 %) | 168.9 (96 %) | 6.2 | 0.2 | Driver.Packet 165.1, Driver.EndSubmission 0.1 | | draw committer | 74.2 (42 %) | 7.1 (4 %) | 94.2 | 37.1 | Graphics.Draw 70.1, Recorder.Submit 3.4 | | presenter | 1.1 (1 %) | 1.8 (1 %) | 172.7 | 0.0 | VideoOut.Flip 2.8, Driver.Present 0.1 | | queue worker 0x46 | 0.8 (0 %) | 169.3 (96 %) | 5.4 | 0.8 | Driver.Packet 17.5, Driver.EndSubmission 0.1 | | title | 0.9 (0 %) | 0.0 (0 %) | 174.7 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.9 | | gpu | 152.1 (87 %) | 0.0 (0 %) | 23.4 | 0.0 | batch 152.1 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 506.8, Driver.Packet.memory_wait 302.3, Driver.WorkerWait 156.6, batch 152.1, Driver.WorkerWait.dequeue_order 144.8, Driver.Packet.draw 78.7, Driver.Draw 77.5, Graphics.Draw 70.5, Driver.Packet.prepare_memory 58.7, Graphics.Draw.draw_and_resource_release 56.9 **Longest waits** - Driver.WorkerWait (queue worker 0x46) 284.1 ms at 4042 ms, present 2961 - Driver.WorkerWait (queue worker 0x46) 282.2 ms at 1244 ms, present 2945 - Driver.WorkerWait (queue worker 0x46) 210.3 ms at 3826 ms, present 2959 - Driver.WorkerWait (queue worker 0x46) 202.4 ms at 1037 ms, present 2943 - Driver.Packet.memory_wait (queue worker 0x48) 185.7 ms at 3685 ms, present 2959 - Driver.WorkerWait (queue worker 0x46) 184.7 ms at 2205 ms, present 2950 - Driver.Packet.memory_wait (queue worker 0x48) 184.3 ms at 4385 ms, present 2963 - Driver.WorkerWait (queue worker 0x46) 182.7 ms at 2564 ms, present 2952 - Driver.Packet.memory_wait (queue worker 0x48) 178.7 ms at 544 ms, present 2941 - Driver.Packet.memory_wait (queue worker 0x48) 178.4 ms at 1246 ms, present 2945 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 10: 20.3 ms at 17 ms, present 2938: GPU no ranges; recorded by Graphics.Draw (draw committer) 5.2, Graphics.Draw.draw_and_resource_release (draw committer) 4.5, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0 - batch 1758: 20.3 ms at 2131 ms, present 2950: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.2, Graphics.Draw.draw_and_resource_release (draw committer) 3.6, Graphics.Draw.validate (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 - batch 880: 20.0 ms at 1091 ms, present 2944: GPU no ranges; recorded by Graphics.Draw (draw committer) 6.1, Graphics.Draw.draw_and_resource_release (draw committer) 5.4, Graphics.Draw.validate (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 - batch 1630: 19.9 ms at 1965 ms, present 2949: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.6, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0 - batch 2031: 19.9 ms at 2495 ms, present 2952: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.5, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0 </details> <details><summary>trace_digest.py, run 2 (this PR)</summary> **seconds 150:5** from present 2753: 33 presents, frame p50 155.3 / p90 164.0 / p99 165.2 / max 165.2 ms, GPU busy 96.2 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c514ef5, dropped: no ```json {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2753,"ms":5110.32},"presents":33,"frame_ms":{"p50":155.333,"p90":164.003,"p99":165.208,"max":165.208},"gpu_busy_ms_per_present":96.173,"worker_busy_pct":{"queue worker 0x0":98.684,"queue worker 0x40":97.781,"queue worker 0x48":94.318,"queue worker 0x46":11.173},"top_phases_ms_per_frame":{"Driver.Packet":467.172,"Driver.Packet.memory_wait":275.849,"Driver.Packet.draw":87.205,"Graphics.Draw":86.542,"Driver.Draw":86.075,"Graphics.Draw.draw_and_resource_release":69.994,"Driver.Draw.shader_compile_and_link":52.713,"Driver.Packet.dispatch":43.352},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-26736.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2756: 165.2 ms at 481 ms: Driver.Packet (queue worker 0x40) 164.7, Driver.Packet (queue worker 0x48) 161.9, Driver.Packet.memory_wait (queue worker 0x48) 161.5, Driver.Packet.memory_wait (queue worker 0x40) 145.9 - present 2769: 164.6 ms at 2500 ms: Driver.Packet (queue worker 0x40) 164.0, Driver.Packet (queue worker 0x48) 160.2, Driver.Packet.memory_wait (queue worker 0x48) 159.8, Driver.WorkerWait (queue worker 0x46) 145.9 - present 2783: 164.3 ms at 4627 ms: Driver.Packet (queue worker 0x40) 163.9, Driver.Packet (queue worker 0x48) 161.0, Driver.Packet.memory_wait (queue worker 0x48) 160.5, Driver.WorkerWait (queue worker 0x46) 145.7 - present 2768: 164.0 ms at 2336 ms: Driver.Packet (queue worker 0x40) 163.6, Driver.Packet (queue worker 0x48) 159.2, Driver.Packet.memory_wait (queue worker 0x48) 158.7, Driver.WorkerWait (queue worker 0x46) 144.8 - present 2771: 163.4 ms at 2818 ms: Driver.Packet (queue worker 0x40) 162.9, Driver.Packet (queue worker 0x48) 159.2, Driver.Packet.memory_wait (queue worker 0x48) 158.6, Driver.Packet.memory_wait (queue worker 0x40) 145.1 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 127.2 (82 %) | 5.9 (4 %) | 21.8 | 126.1 | Driver.Packet 132.9, Driver.EndSubmission 0.1 | | title | 0.3 (0 %) | 0.0 (0 %) | 154.5 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.1 | | title | 1.0 (1 %) | 0.0 (0 %) | 153.8 | 0.9 | Shader.ResolveGraphicsStagesAbi 1.0, Shader.ResolveAbi 0.0 | | title | 0.8 (1 %) | 0.0 (0 %) | 154.1 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1 | | title | 0.8 (1 %) | 0.0 (0 %) | 154.1 | 0.8 | Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1 | | queue worker 0x40 | 10.5 (7 %) | 140.6 (91 %) | 3.7 | 2.0 | Driver.Packet 151.0, Driver.EndSubmission 0.1 | | queue worker 0x48 | 0.5 (0 %) | 149.6 (97 %) | 4.8 | 0.2 | Driver.Packet 145.9, Driver.EndSubmission 0.1 | | draw committer | 77.2 (50 %) | 5.8 (4 %) | 71.9 | 37.7 | Graphics.Draw 73.0, Recorder.Submit 3.5 | | presenter | 1.1 (1 %) | 1.9 (1 %) | 151.9 | 0.0 | VideoOut.Flip 2.8, Driver.Present 0.1 | | queue worker 0x46 | 0.8 (0 %) | 149.7 (97 %) | 4.4 | 0.8 | Driver.Packet 17.1, Driver.EndSubmission 0.0 | | title | 0.7 (0 %) | 0.0 (0 %) | 154.1 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.7 | | gpu | 96.2 (62 %) | 0.0 (0 %) | 58.6 | 0.0 | batch 96.2 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 446.9, Driver.Packet.memory_wait 275.8, Driver.WorkerWait 137.4, Driver.WorkerWait.dequeue_order 128.4, batch 96.2, Driver.Packet.draw 74.6, Graphics.Draw 73.5, Driver.Draw 73.4, Graphics.Draw.draw_and_resource_release 59.9, Driver.Packet.dispatch 43.2 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x48) 160.7 ms at 488 ms, present 2756 - Driver.Packet.memory_wait (queue worker 0x48) 159.5 ms at 2508 ms, present 2769 - Driver.Packet.memory_wait (queue worker 0x48) 159.4 ms at 4634 ms, present 2783 - Driver.Packet.memory_wait (queue worker 0x48) 158.7 ms at 2344 ms, present 2768 - Driver.Packet.memory_wait (queue worker 0x48) 158.4 ms at 2825 ms, present 2771 - Driver.Packet.memory_wait (queue worker 0x48) 157.9 ms at 169 ms, present 2754 - Driver.Packet.memory_wait (queue worker 0x48) 155.8 ms at 8 ms, present 2753 - Driver.Packet.memory_wait (queue worker 0x48) 154.0 ms at 4799 ms, present 2784 - Driver.Packet.memory_wait (queue worker 0x48) 153.8 ms at 331 ms, present 2755 - Driver.Packet.memory_wait (queue worker 0x48) 153.4 ms at 654 ms, present 2757 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 2423: 16.6 ms at 2534 ms, present 2769: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 2723: 16.5 ms at 2853 ms, present 2771: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 166: 16.3 ms at 195 ms, present 2754: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 3475: 16.3 ms at 3595 ms, present 2776: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 4815: 16.3 ms at 4984 ms, present 2785: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 </details> <details><summary>trace_digest.py, run 3 (main)</summary> **seconds 150:5** from present 2660: 29 presents, frame p50 174.6 / p90 182.9 / p99 185.6 / max 185.6 ms, GPU busy 152.6 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea52e571, dropped: no ```json {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2660,"ms":5017.386},"presents":29,"frame_ms":{"p50":174.619,"p90":182.895,"p99":185.561,"max":185.561},"gpu_busy_ms_per_present":152.577,"worker_busy_pct":{"queue worker 0x0":98.804,"queue worker 0x40":97.803,"queue worker 0x48":93.909,"queue worker 0x46":9.464},"top_phases_ms_per_frame":{"Driver.Packet":518.59,"Driver.Packet.memory_wait":298.946,"Driver.Packet.draw":86.549,"Driver.Draw":85.458,"Graphics.Draw":81.895,"Driver.Packet.prepare_memory":65.5,"Graphics.Draw.draw_and_resource_release":65.075,"Driver.Draw.shader_compile_and_link":52.003},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-12684.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2688: 185.6 ms at 4832 ms: Driver.Packet (queue worker 0x0) 163.4, batch (gpu) 155.2, Driver.Packet (queue worker 0x40) 146.8, Driver.WorkerWait (queue worker 0x46) 105.3 - present 2667: 183.3 ms at 1226 ms: Driver.Packet (queue worker 0x40) 182.5, Driver.Packet (queue worker 0x48) 179.1, Driver.Packet.memory_wait (queue worker 0x48) 178.7, batch (gpu) 163.1 - present 2664: 182.9 ms at 703 ms: Driver.Packet (queue worker 0x40) 182.5, Driver.Packet (queue worker 0x48) 178.9, Driver.Packet.memory_wait (queue worker 0x48) 178.4, batch (gpu) 161.2 - present 2687: 181.0 ms at 4651 ms: Driver.Packet (queue worker 0x40) 180.6, Driver.Packet (queue worker 0x48) 176.0, Driver.Packet.memory_wait (queue worker 0x48) 175.6, Driver.WorkerWait (queue worker 0x46) 160.5 - present 2682: 179.9 ms at 3773 ms: Driver.Packet (queue worker 0x40) 179.3, Driver.Packet (queue worker 0x48) 174.9, Driver.Packet.memory_wait (queue worker 0x48) 174.3, Driver.WorkerWait (queue worker 0x46) 160.5 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 125.7 (73 %) | 25.2 (15 %) | 22.1 | 124.2 | Driver.Packet 150.8, Driver.EndSubmission 0.1 | | title | 0.3 (0 %) | 0.0 (0 %) | 172.7 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.0 | | title | 1.1 (1 %) | 0.0 (0 %) | 171.9 | 0.9 | Shader.ResolveGraphicsStagesAbi 1.1, Shader.ResolveAbi 0.0 | | title | 0.8 (0 %) | 0.0 (0 %) | 172.2 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1 | | title | 0.8 (0 %) | 0.0 (0 %) | 172.2 | 0.8 | Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.2 | | queue worker 0x40 | 12.2 (7 %) | 156.6 (91 %) | 4.2 | 2.1 | Driver.Packet 168.7, Driver.EndSubmission 0.1 | | queue worker 0x48 | 0.5 (0 %) | 166.1 (96 %) | 6.4 | 0.2 | Driver.Packet 162.3, Driver.EndSubmission 0.1 | | draw committer | 72.6 (42 %) | 6.0 (3 %) | 94.4 | 37.4 | Graphics.Draw 68.5, Recorder.Submit 3.4 | | presenter | 1.1 (1 %) | 2.0 (1 %) | 169.9 | 0.0 | VideoOut.Flip 3.0, Driver.Present 0.1 | | queue worker 0x46 | 0.8 (0 %) | 164.6 (95 %) | 7.7 | 0.8 | Driver.Packet 16.1, Driver.EndSubmission 0.1 | | title | 0.8 (0 %) | 0.0 (0 %) | 172.2 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.8 | | gpu | 152.4 (88 %) | 0.0 (0 %) | 20.6 | 0.0 | batch 152.4 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 497.9, Driver.Packet.memory_wait 298.9, Driver.WorkerWait 153.5, batch 152.4, Driver.WorkerWait.dequeue_order 138.5, Driver.Packet.draw 73.7, Driver.Draw 72.6, Graphics.Draw 68.9, Driver.Packet.prepare_memory 64.2, Graphics.Draw.draw_and_resource_release 55.0 **Longest waits** - Driver.WorkerWait (queue worker 0x46) 288.2 ms at 4303 ms, present 2685 - Driver.WorkerWait (queue worker 0x46) 286.4 ms at 184 ms, present 2661 - Driver.WorkerWait (queue worker 0x46) 255.3 ms at 3088 ms, present 2678 - Driver.WorkerWait (queue worker 0x46) 240.4 ms at 1581 ms, present 2669 - Driver.WorkerWait (queue worker 0x46) 210.4 ms at 4087 ms, present 2683 - Driver.WorkerWait (queue worker 0x46) 204.7 ms at 1371 ms, present 2667 - Driver.WorkerWait (queue worker 0x46) 201.0 ms at 2547 ms, present 2674 - Driver.WorkerWait (queue worker 0x46) 193.6 ms at 2889 ms, present 2676 - Driver.Packet.memory_wait (queue worker 0x48) 178.5 ms at 1233 ms, present 2667 - Driver.Packet.memory_wait (queue worker 0x48) 178.1 ms at 710 ms, present 2664 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3988: 22.1 ms at 4878 ms, present 2688: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.7, Graphics.Draw.draw_and_resource_release (draw committer) 4.1, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0 - batch 1459: 20.3 ms at 1780 ms, present 2670: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.0, Graphics.Draw.draw_and_resource_release (draw committer) 3.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0 - batch 1585: 20.3 ms at 1956 ms, present 2671: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.9, Graphics.Draw.draw_and_resource_release (draw committer) 4.3, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0 - batch 2138: 20.2 ms at 2599 ms, present 2675: GPU no ranges; recorded by Graphics.Draw (draw committer) 5.5, Graphics.Draw.draw_and_resource_release (draw committer) 4.9, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0 - batch 280: 20.1 ms at 368 ms, present 2662: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.8, Graphics.Draw.draw_and_resource_release (draw committer) 4.2, Recorder.Submit (draw committer) 0.1 </details> <details><summary>trace_digest.py, run 4 (this PR)</summary> **seconds 150:5** from present 4310: 32 presents, frame p50 160.3 / p90 167.4 / p99 172.9 / max 172.9 ms, GPU busy 91.6 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c514ef5, dropped: no ```json {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":4310,"ms":5118.256},"presents":32,"frame_ms":{"p50":160.333,"p90":167.439,"p99":172.874,"max":172.874},"gpu_busy_ms_per_present":91.612,"worker_busy_pct":{"queue worker 0x0":98.652,"queue worker 0x40":97.934,"queue worker 0x48":94.517,"queue worker 0x46":9.894},"top_phases_ms_per_frame":{"Driver.Packet":481.041,"Driver.Packet.memory_wait":286.595,"Driver.Packet.draw":92.17,"Graphics.Draw":91.69,"Driver.Draw":90.991,"Graphics.Draw.draw_and_resource_release":75.211,"Driver.Draw.shader_compile_and_link":55.081,"Shader.DrawStage":44.516},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-3760.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 4324: 172.9 ms at 2235 ms: Driver.Packet (queue worker 0x40) 172.4, Driver.Packet (queue worker 0x48) 169.0, Driver.Packet.memory_wait (queue worker 0x48) 168.4, Driver.WorkerWait (queue worker 0x46) 154.6 - present 4339: 172.5 ms at 4628 ms: Driver.Packet (queue worker 0x40) 172.1, Driver.Packet (queue worker 0x48) 169.0, Driver.Packet.memory_wait (queue worker 0x48) 168.5, Driver.WorkerWait (queue worker 0x46) 155.3 - present 4319: 169.7 ms at 1411 ms: Driver.Packet (queue worker 0x40) 169.2, Driver.Packet (queue worker 0x48) 165.8, Driver.Packet.memory_wait (queue worker 0x48) 165.4, Driver.WorkerWait (queue worker 0x46) 149.5 - present 4337: 167.4 ms at 4296 ms: Driver.Packet (queue worker 0x40) 167.0, Driver.Packet (queue worker 0x48) 163.0, Driver.Packet.memory_wait (queue worker 0x48) 162.5, Driver.WorkerWait (queue worker 0x46) 157.4 - present 4323: 167.0 ms at 2068 ms: Driver.Packet (queue worker 0x40) 166.5, Driver.Packet (queue worker 0x48) 162.7, Driver.Packet.memory_wait (queue worker 0x48) 162.2, Driver.WorkerWait (queue worker 0x46) 149.8 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 132.5 (83 %) | 5.7 (4 %) | 21.7 | 125.6 | Driver.Packet 138.1, Driver.EndSubmission 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 159.9 | 0.0 | Vulkan.GraphicsPipelinePrebuild 0.0 | | title | 0.4 (0 %) | 0.0 (0 %) | 159.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.3, Shader.ResolveAbi 0.1 | | title | 1.2 (1 %) | 0.0 (0 %) | 158.8 | 0.9 | Shader.ResolveGraphicsStagesAbi 1.2, Shader.ResolveAbi 0.0 | | title | 0.9 (1 %) | 0.0 (0 %) | 159.1 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.8, Shader.ResolveAbi 0.1 | | title | 0.8 (1 %) | 0.0 (0 %) | 159.1 | 0.8 | Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1 | | queue worker 0x40 | 10.7 (7 %) | 145.6 (91 %) | 3.6 | 2.1 | Driver.Packet 156.3, Driver.EndSubmission 0.1 | | queue worker 0x48 | 0.6 (0 %) | 154.7 (97 %) | 4.6 | 0.2 | Driver.Packet 151.0, Driver.EndSubmission 0.1 | | draw committer | 82.5 (52 %) | 5.8 (4 %) | 71.6 | 37.0 | Graphics.Draw 78.3, Recorder.Submit 3.5 | | presenter | 1.0 (1 %) | 1.9 (1 %) | 157.0 | 0.0 | VideoOut.Flip 2.9, Driver.Present 0.0 | | queue worker 0x46 | 0.8 (0 %) | 154.7 (97 %) | 4.5 | 0.8 | Driver.Packet 15.6, Driver.EndSubmission 0.0 | | title | 0.8 (0 %) | 0.0 (0 %) | 159.2 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.8 | | gpu | 94.7 (59 %) | 0.0 (0 %) | 65.3 | 0.0 | batch 94.7 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 460.9, Driver.Packet.memory_wait 286.6, Driver.WorkerWait 144.0, Driver.WorkerWait.dequeue_order 134.5, batch 94.7, Driver.Packet.draw 79.7, Graphics.Draw 78.8, Driver.Draw 78.5, Graphics.Draw.draw_and_resource_release 65.5, Driver.Draw.shader_compile_and_link 44.4 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x48) 168.3 ms at 2242 ms, present 4324 - Driver.Packet.memory_wait (queue worker 0x48) 168.2 ms at 4635 ms, present 4339 - Driver.Packet.memory_wait (queue worker 0x48) 164.3 ms at 1418 ms, present 4319 - Driver.Packet.memory_wait (queue worker 0x48) 162.3 ms at 4303 ms, present 4337 - Driver.Packet.memory_wait (queue worker 0x48) 162.0 ms at 2076 ms, present 4323 - Driver.Packet.memory_wait (queue worker 0x48) 161.6 ms at 1910 ms, present 4322 - Driver.Packet.memory_wait (queue worker 0x48) 161.5 ms at 4808 ms, present 4340 - Driver.Packet.memory_wait (queue worker 0x48) 159.6 ms at 4471 ms, present 4338 - Driver.WorkerWait (queue worker 0x46) 159.3 ms at 4248 ms, present 4336 - Driver.Packet.memory_wait (queue worker 0x48) 157.3 ms at 3982 ms, present 4335 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 628: 16.3 ms at 654 ms, present 4314: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 2168: 16.2 ms at 2270 ms, present 4324: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 1394: 16.0 ms at 1451 ms, present 4319: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 2015: 15.8 ms at 2115 ms, present 4323: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 939: 15.8 ms at 969 ms, present 4316: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 </details> <details><summary>trace_digest.py, run 5 (main)</summary> **seconds 150:5** from present 2658: 29 presents, frame p50 174.5 / p90 183.5 / p99 184.9 / max 184.9 ms, GPU busy 152.0 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea52e571, dropped: no ```json {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2658,"ms":5045.459},"presents":29,"frame_ms":{"p50":174.497,"p90":183.493,"p99":184.907,"max":184.907},"gpu_busy_ms_per_present":151.991,"worker_busy_pct":{"queue worker 0x0":98.787,"queue worker 0x40":97.445,"queue worker 0x48":94.411,"queue worker 0x46":9.031},"top_phases_ms_per_frame":{"Driver.Packet":520.917,"Driver.Packet.memory_wait":298.77,"Driver.Packet.draw":91.749,"Driver.Draw":90.597,"Graphics.Draw":83.471,"Graphics.Draw.draw_and_resource_release":66.106,"Driver.Packet.prepare_memory":55.606,"Driver.Draw.shader_compile_and_link":53.222},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25028.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2675: 184.9 ms at 2951 ms: Driver.Packet (queue worker 0x40) 184.5, Driver.Packet (queue worker 0x48) 180.7, Driver.Packet.memory_wait (queue worker 0x48) 180.2, Driver.WorkerWait (queue worker 0x46) 163.7 - present 2660: 184.2 ms at 356 ms: Driver.Packet (queue worker 0x40) 183.8, Driver.Packet (queue worker 0x48) 180.1, Driver.Packet.memory_wait (queue worker 0x48) 179.5, Driver.WorkerWait (queue worker 0x46) 162.9 - present 2674: 183.5 ms at 2767 ms: Driver.Packet (queue worker 0x40) 183.1, Driver.Packet (queue worker 0x48) 179.2, Driver.Packet.memory_wait (queue worker 0x48) 178.4, Driver.WorkerWait (queue worker 0x46) 163.6 - present 2658: 183.2 ms at 0 ms: Driver.Packet (queue worker 0x48) 176.4, Driver.Packet.memory_wait (queue worker 0x48) 175.9, Driver.Packet (queue worker 0x0) 161.4, batch (gpu) 156.7 - present 2666: 181.9 ms at 1398 ms: Driver.Packet (queue worker 0x40) 181.4, Driver.Packet (queue worker 0x48) 177.5, Driver.Packet.memory_wait (queue worker 0x48) 177.0, Driver.WorkerWait (queue worker 0x46) 176.3 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 134.4 (77 %) | 17.6 (10 %) | 22.0 | 125.2 | Driver.Packet 151.8, Driver.EndSubmission 0.0 | | title | 0.3 (0 %) | 0.0 (0 %) | 173.7 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.0 | | title | 1.2 (1 %) | 0.0 (0 %) | 172.8 | 0.9 | Shader.ResolveGraphicsStagesAbi 1.1, Shader.ResolveAbi 0.0 | | title | 0.9 (1 %) | 0.0 (0 %) | 173.1 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.8, Shader.ResolveAbi 0.1 | | title | 0.8 (0 %) | 0.0 (0 %) | 173.2 | 0.8 | Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.2 | | queue worker 0x40 | 15.9 (9 %) | 153.3 (88 %) | 4.8 | 2.1 | Driver.Packet 169.0, Driver.EndSubmission 0.2 | | queue worker 0x48 | 0.5 (0 %) | 168.1 (97 %) | 5.4 | 0.2 | Driver.Packet 164.1, Driver.EndSubmission 0.1 | | draw committer | 74.3 (43 %) | 9.1 (5 %) | 90.6 | 37.5 | Graphics.Draw 70.1, Recorder.Submit 3.5 | | presenter | 1.0 (1 %) | 1.9 (1 %) | 171.1 | 0.0 | VideoOut.Flip 2.8, Driver.Present 0.1 | | queue worker 0x46 | 0.9 (0 %) | 167.5 (96 %) | 5.6 | 0.8 | Driver.Packet 15.5, Driver.EndSubmission 0.1 | | title | 0.8 (0 %) | 0.0 (0 %) | 173.2 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.8 | | gpu | 151.0 (87 %) | 0.0 (0 %) | 23.0 | 0.0 | batch 151.0 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 500.3, Driver.Packet.memory_wait 298.8, Driver.WorkerWait 157.2, batch 151.0, Driver.WorkerWait.dequeue_order 143.9, Driver.Packet.draw 79.0, Driver.Draw 77.9, Graphics.Draw 70.5, Graphics.Draw.draw_and_resource_release 56.1, Driver.Packet.prepare_memory 54.3 **Longest waits** - Driver.WorkerWait (queue worker 0x46) 283.8 ms at 1916 ms, present 2669 - Driver.WorkerWait (queue worker 0x46) 281.0 ms at 880 ms, present 2663 - Driver.WorkerWait (queue worker 0x46) 277.4 ms at 1404 ms, present 2666 - Driver.WorkerWait (queue worker 0x46) 212.6 ms at 661 ms, present 2661 - Driver.WorkerWait (queue worker 0x46) 208.1 ms at 1190 ms, present 2664 - Driver.WorkerWait (queue worker 0x46) 202.2 ms at 1709 ms, present 2667 - Driver.Packet.memory_wait (queue worker 0x48) 179.4 ms at 363 ms, present 2660 - Driver.Packet.memory_wait (queue worker 0x48) 179.0 ms at 2775 ms, present 2674 - Driver.Packet.memory_wait (queue worker 0x48) 178.7 ms at 2959 ms, present 2675 - Driver.Packet.memory_wait (queue worker 0x48) 178.0 ms at 7 ms, present 2658 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 1017: 21.4 ms at 1246 ms, present 2665: GPU no ranges; recorded by Graphics.Draw (draw committer) 5.3, Graphics.Draw.draw_and_resource_release (draw committer) 4.7, Recorder.Submit (draw committer) 0.0 - batch 589: 21.1 ms at 743 ms, present 2662: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.9, Graphics.Draw.draw_and_resource_release (draw committer) 3.3, Recorder.Submit (draw committer) 0.0 - batch 1174: 20.6 ms at 1447 ms, present 2666: GPU no ranges; recorded by Graphics.Draw (draw committer) 3.6, Graphics.Draw.draw_and_resource_release (draw committer) 3.0, Recorder.Submit (draw committer) 0.0, Graphics.Draw.validate (draw committer) 0.0 - batch 1751: 20.2 ms at 2120 ms, present 2670: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.3, Graphics.Draw.draw_and_resource_release (draw committer) 3.6, Recorder.Submit (draw committer) 0.1 - batch 2481: 19.8 ms at 2998 ms, present 2675: GPU no ranges; recorded by Graphics.Draw (draw committer) 4.3, Graphics.Draw.draw_and_resource_release (draw committer) 3.7, Graphics.Draw.validate (draw committer) 0.0, Recorder.Submit (draw committer) 0.0 </details> <details><summary>trace_digest.py, run 6 (this PR)</summary> **seconds 150:5** from present 2779: 33 presents, frame p50 152.8 / p90 161.1 / p99 166.5 / max 166.5 ms, GPU busy 96.4 ms per present NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c514ef5, dropped: no ```json {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2779,"ms":5089.771},"presents":33,"frame_ms":{"p50":152.754,"p90":161.061,"p99":166.455,"max":166.455},"gpu_busy_ms_per_present":96.415,"worker_busy_pct":{"queue worker 0x0":98.647,"queue worker 0x40":97.92,"queue worker 0x48":94.465,"queue worker 0x46":11.271},"top_phases_ms_per_frame":{"Driver.Packet":465.854,"Driver.Packet.memory_wait":274.814,"Driver.Packet.draw":87.031,"Graphics.Draw":86.515,"Driver.Draw":85.879,"Graphics.Draw.draw_and_resource_release":70.117,"Driver.Draw.shader_compile_and_link":51.299,"Driver.Packet.dispatch":43.309},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-27560.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2803: 166.5 ms at 3719 ms: Driver.Packet (queue worker 0x40) 165.8, Driver.Packet (queue worker 0x48) 162.2, Driver.Packet.memory_wait (queue worker 0x48) 161.7, Driver.WorkerWait (queue worker 0x46) 146.5 - present 2804: 164.9 ms at 3885 ms: Driver.Packet (queue worker 0x40) 164.5, Driver.Packet (queue worker 0x48) 160.3, Driver.Packet.memory_wait (queue worker 0x48) 159.6, Driver.WorkerWait (queue worker 0x46) 146.1 - present 2788: 163.4 ms at 1405 ms: Driver.Packet (queue worker 0x40) 162.9, Driver.Packet (queue worker 0x48) 159.4, Driver.Packet.memory_wait (queue worker 0x48) 158.9, Driver.WorkerWait (queue worker 0x46) 144.5 - present 2785: 161.1 ms at 924 ms: Driver.Packet (queue worker 0x40) 160.6, Driver.Packet (queue worker 0x48) 155.8, Driver.Packet.memory_wait (queue worker 0x48) 155.4, Driver.WorkerWait (queue worker 0x46) 143.1 - present 2783: 160.7 ms at 604 ms: Driver.Packet (queue worker 0x40) 160.2, Driver.Packet (queue worker 0x48) 155.9, Driver.Packet.memory_wait (queue worker 0x48) 155.2, Driver.WorkerWait (queue worker 0x46) 144.3 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 126.3 (82 %) | 5.9 (4 %) | 22.0 | 125.9 | Driver.Packet 132.0, Driver.EndSubmission 0.1 | | title | 0.3 (0 %) | 0.0 (0 %) | 154.0 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.2, Shader.ResolveAbi 0.1 | | title | 1.0 (1 %) | 0.0 (0 %) | 153.2 | 0.9 | Shader.ResolveGraphicsStagesAbi 1.0, Shader.ResolveAbi 0.0 | | title | 0.8 (1 %) | 0.0 (0 %) | 153.5 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.7, Shader.ResolveAbi 0.1 | | title | 0.7 (0 %) | 0.0 (0 %) | 153.5 | 0.8 | Shader.ResolveGraphicsStagesAbi 0.6, Shader.ResolveAbi 0.1 | | queue worker 0x40 | 11.0 (7 %) | 139.7 (91 %) | 3.5 | 2.1 | Driver.Packet 150.6, Driver.EndSubmission 0.1 | | queue worker 0x48 | 0.5 (0 %) | 149.2 (97 %) | 4.6 | 0.2 | Driver.Packet 145.5, Driver.EndSubmission 0.1 | | draw committer | 76.8 (50 %) | 6.4 (4 %) | 71.1 | 38.1 | Graphics.Draw 72.6, Recorder.Submit 3.5 | | presenter | 1.0 (1 %) | 1.8 (1 %) | 151.4 | 0.1 | VideoOut.Flip 2.8, Driver.Present 0.1 | | queue worker 0x46 | 0.8 (1 %) | 149.1 (97 %) | 4.3 | 0.8 | Driver.Packet 17.2, Driver.EndSubmission 0.1 | | title | 0.7 (0 %) | 0.0 (0 %) | 153.5 | 0.3 | Shader.ResolveGraphicsStagesAbi 0.7 | | gpu | 96.5 (63 %) | 0.0 (0 %) | 57.8 | 0.0 | batch 96.5 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 445.3, Driver.Packet.memory_wait 274.8, Driver.WorkerWait 136.7, Driver.WorkerWait.dequeue_order 127.8, batch 96.5, Driver.Packet.draw 74.1, Graphics.Draw 73.1, Driver.Draw 72.8, Graphics.Draw.draw_and_resource_release 60.0, Driver.Packet.dispatch 43.1 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x48) 161.2 ms at 3726 ms, present 2803 - Driver.Packet.memory_wait (queue worker 0x48) 159.8 ms at 3893 ms, present 2804 - Driver.Packet.memory_wait (queue worker 0x48) 159.3 ms at 1412 ms, present 2788 - Driver.Packet.memory_wait (queue worker 0x48) 156.6 ms at 1251 ms, present 2787 - Driver.Packet.memory_wait (queue worker 0x48) 155.5 ms at 932 ms, present 2785 - Driver.Packet.memory_wait (queue worker 0x48) 155.0 ms at 612 ms, present 2783 - Driver.Packet.memory_wait (queue worker 0x48) 154.5 ms at 1093 ms, present 2786 - Driver.Packet.memory_wait (queue worker 0x48) 154.4 ms at 772 ms, present 2784 - Driver.Packet.memory_wait (queue worker 0x48) 154.3 ms at 3252 ms, present 2800 - Driver.Packet.memory_wait (queue worker 0x48) 152.7 ms at 8 ms, present 2779 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3776: 16.1 ms at 3920 ms, present 2804: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 3020: 16.0 ms at 3120 ms, present 2799: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 2273: 16.0 ms at 2349 ms, present 2794: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 - batch 3626: 16.0 ms at 3759 ms, present 2803: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.0 - batch 4230: 16.0 ms at 4371 ms, present 2807: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.1, Graphics.Draw.draw_and_resource_release (draw committer) 0.1, Recorder.Submit (draw committer) 0.1 </details> ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 616.64, Windows 11 (10.0.26200); AMD Radeon 860M (RADV, Mesa 26.2.5, Fedora 44), the focused tests with and without the validation layer, run by Lander0606 (the BAR path is taken): https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6364834002 - [x] AI-assisted: yes
panicDa3m0n commented 2026-10-22 10:21:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by panicDa3m0n on 2026-10-22T10:21:02Z.


Traces of the four runs whose summary lines are in the description, in run order (main, this PR, main, this PR). GitHub did not take the .json.gz files as attachments here, so they are stored unchanged in one zip; trace_digest.py and performance_compare.py read them as they are.

aps5-traces-pr9712.zip

Run Trace in the zip
1, main aps5-trace-d6eafa54d046-16512.json.gz
2, this PR aps5-trace-b5b8d4e27aa8-452.json.gz
3, main aps5-trace-d6eafa54d046-14692.json.gz
4, this PR aps5-trace-b5b8d4e27aa8-23524.json.gz
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6338413315 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6338413315). Originally posted by [panicDa3m0n](https://github.com/panicDa3m0n) on 2026-10-22T10:21:02Z. --- Traces of the four runs whose summary lines are in the description, in run order (main, this PR, main, this PR). GitHub did not take the .json.gz files as attachments here, so they are stored unchanged in one zip; trace_digest.py and performance_compare.py read them as they are. [aps5-traces-pr9712.zip](https://github.com/user-attachments/files/33814854/aps5-traces-pr9712.zip) | Run | Trace in the zip | |---|---| | 1, main | `aps5-trace-d6eafa54d046-16512.json.gz` | | 2, this PR | `aps5-trace-b5b8d4e27aa8-452.json.gz` | | 3, main | `aps5-trace-d6eafa54d046-14692.json.gz` | | 4, this PR | `aps5-trace-b5b8d4e27aa8-23524.json.gz` |
Scramblrrrr commented 2026-10-22 10:55:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-22T10:55:12Z.


Preparing a Windows 007 cross-test of b5b8d4e27aa, not a duplicate implementation. Source-only integration merges cleanly on current main 4777caca with our existing bring-up stack; conventions pass and original authorship is retained:
https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-oct22-bar-snapshots (4b61c25affd5)
Base without this change: codex/first-light-oct22-current-base (52c69fbb3736).

UNBUILT/UNTESTED here so far; our pinned same-build input-policy control is running first. Planned checks are the same native draw/vertex/index/snapshot selection on the base and candidate, actual Khronos layer, no shader cache, plus the disabled-BAR control before a title comparison. Hardware is Windows 11 / RTX 5070 Ti 617.42 / 7800X3D / 32 GiB.

One concern from your stated limitation: our 007 runs are already memory-constrained. Before I stress the title, are you planning the Buffer/slab host-memory fallback in this branch? I will not attribute an allocation failure under VRAM pressure to the title itself. No speed claim yet; raw title code/captures stay local. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339025647 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6339025647). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-22T10:55:12Z. --- Preparing a Windows 007 cross-test of b5b8d4e27aa, not a duplicate implementation. Source-only integration merges cleanly on current main 4777caca with our existing bring-up stack; conventions pass and original authorship is retained: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-oct22-bar-snapshots (4b61c25affd5) Base without this change: codex/first-light-oct22-current-base (52c69fbb3736). UNBUILT/UNTESTED here so far; our pinned same-build input-policy control is running first. Planned checks are the same native draw/vertex/index/snapshot selection on the base and candidate, actual Khronos layer, no shader cache, plus the disabled-BAR control before a title comparison. Hardware is Windows 11 / RTX 5070 Ti 617.42 / 7800X3D / 32 GiB. One concern from your stated limitation: our 007 runs are already memory-constrained. Before I stress the title, are you planning the Buffer/slab host-memory fallback in this branch? I will not attribute an allocation failure under VRAM pressure to the title itself. No speed claim yet; raw title code/captures stay local. AI-assisted: Codex.
Scramblrrrr commented 2026-10-22 10:58:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-22T10:58:01Z.


One source-review question before my native run: HostReadableInput takes a second GuestMemory::Read for BAR-backed index buffers, after CopyDrawInput already populated the draw snapshot. If the guest writes those indices between the copy and the highest-index/restart-table scan, the CPU can scan different indices from the snapshot bound for this draw. The host-memory path scans copy.buffer itself, so it preserves that relationship.

Could we retain a host shadow of the exact index snapshot (or read back the snapshot for these scans), rather than re-read mutable guest memory? A focused regression could copy indices, mutate the guest source, then check that the derived highest index / restart table still match the bound snapshot. This is a source-review concern; I have not reproduced it in a title or run that regression yet. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339074938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6339074938). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-22T10:58:01Z. --- One source-review question before my native run: HostReadableInput takes a second GuestMemory::Read for BAR-backed index buffers, after CopyDrawInput already populated the draw snapshot. If the guest writes those indices between the copy and the highest-index/restart-table scan, the CPU can scan different indices from the snapshot bound for this draw. The host-memory path scans copy.buffer itself, so it preserves that relationship. Could we retain a host shadow of the exact index snapshot (or read back the snapshot for these scans), rather than re-read mutable guest memory? A focused regression could copy indices, mutate the guest source, then check that the derived highest index / restart table still match the bound snapshot. This is a source-review concern; I have not reproduced it in a title or run that regression yet. AI-assisted: Codex.
panicDa3m0n commented 2026-10-22 11:31:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by panicDa3m0n on 2026-10-22T11:31:45Z.


Thanks, both points are right.

  • Fallback: yes, in this branch. Buffer and its slabs get the same two placements device buffers already have. A mapped device-local buffer goes to host memory when the reported budget of the device-local heap has no room for it, as DeviceMemoryType places device buffers. It also goes there when its allocation is still refused after the pool trim and the cache reclaim, as with RefusedDeviceMemoryFallback. Properties() then reports host memory, so refreshing such a snapshot compares its blocks again.
  • Index scans: index copies stay in host memory, as on main. The highest index, the mesh restart table and the bound copy then come from the same bytes, and HostReadableInput goes away. Vertex copies and storage snapshots stay in BAR memory. A new test copies indices, stores to the guest source, and checks the copy's memory and its highest index.

I will push both today with their tests, the validation runs on main and on the new head, and new numbers for the head, and say so here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339688921 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6339688921). Originally posted by [panicDa3m0n](https://github.com/panicDa3m0n) on 2026-10-22T11:31:45Z. --- Thanks, both points are right. - **Fallback:** yes, in this branch. `Buffer` and its slabs get the same two placements device buffers already have. A mapped device-local buffer goes to host memory when the reported budget of the device-local heap has no room for it, as `DeviceMemoryType` places device buffers. It also goes there when its allocation is still refused after the pool trim and the cache reclaim, as with `RefusedDeviceMemoryFallback`. `Properties()` then reports host memory, so refreshing such a snapshot compares its blocks again. - **Index scans:** index copies stay in host memory, as on `main`. The highest index, the mesh restart table and the bound copy then come from the same bytes, and `HostReadableInput` goes away. Vertex copies and storage snapshots stay in BAR memory. A new test copies indices, stores to the guest source, and checks the copy's memory and its highest index. I will push both today with their tests, the validation runs on `main` and on the new head, and new numbers for the head, and say so here.
MarcZX10 commented 2026-10-22 12:07:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:07:47Z.

Review: CHANGES_REQUESTED


I reviewed exact head b5b8d4e27aa8709c1dfc713817659d834b95adbc. Two blocking issues remain in this head: the BAR index path scans guest memory again after creating the GPU-bound snapshot, and BAR-backed Buffer allocations have no host-memory fallback when the selected heap cannot satisfy them. Both were already raised in the discussion, and the author acknowledged both with a plan to address them; those fixes are not present in the reviewed head. Please keep the index snapshot and all derived index metadata from the same byte copy, and add the agreed allocation fallback before treating this as ready. The branch is also 15 commits behind current upstream/main, so update it and rerun the focused draw/index tests plus the documented main-vs-change validation run on the updated tree. The current GitHub check list contains successful conventions/intake/label checks but no product build or test job; I could not run a local build because there is no configured build tree and the filesystem is full. I have not independently reproduced the performance figures. Please also coordinate the already-disclosed interaction with open #8756 and confirm the landing/rebase order.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5613873054 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5613873054). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T12:07:47Z. **Review:** CHANGES_REQUESTED --- I reviewed exact head b5b8d4e27aa8709c1dfc713817659d834b95adbc. Two blocking issues remain in this head: the BAR index path scans guest memory again after creating the GPU-bound snapshot, and BAR-backed Buffer allocations have no host-memory fallback when the selected heap cannot satisfy them. Both were already raised in the discussion, and the author acknowledged both with a plan to address them; those fixes are not present in the reviewed head. Please keep the index snapshot and all derived index metadata from the same byte copy, and add the agreed allocation fallback before treating this as ready. The branch is also 15 commits behind current upstream/main, so update it and rerun the focused draw/index tests plus the documented main-vs-change validation run on the updated tree. The current GitHub check list contains successful conventions/intake/label checks but no product build or test job; I could not run a local build because there is no configured build tree and the filesystem is full. I have not independently reproduced the performance figures. Please also coordinate the already-disclosed interaction with open #8756 and confirm the landing/rebase order.
panicDa3m0n commented 2026-10-22 13:59:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by panicDa3m0n on 2026-10-22T13:59:39Z.


Rebased onto current main (3ca07d086). The branch is now three commits, and the review fixes are the last two.

@Scramblrrrr, both of your points are fixed:

  • 88d4e7bcb fix(agc): keep index copies in host memory. HostReadableInput is gone; the highest index and the mesh restart table are scanned from the copy the draw binds. agc_draw_input_memory copies indices, stores to the guest source, and checks the copy's memory and its highest index. It fails when index copies take the snapshot memory.

  • 82315210c fix(agc): give mapped device-local buffers a host memory fallback. A mapped device-local Buffer, slabs included, takes host memory in two cases:

    • when the reported budget of the device-local heap has no room for it, as DeviceMemoryType places device buffers;
    • when its allocation is still refused after the pool trim and the cache reclaim, as RefusedDeviceMemoryFallback does.

    Both cases print rate-limited lines ([gpu] mapped buffer: ..., [bufferpool] ... placed in host memory type ...), so a run under VRAM pressure shows when they happened. MappedDevicePlacement in tests/BufferPool.cpp checks a buffer and a slab within the budget, over it, and after a refusal. It fails without each of the placements.

@MarcZX10, both blocking points are fixed in those two commits. On the updated tree:

  • ctest -R ^agc_ passes except four tests that fail the same way on main's build on this machine: the three agc_driver_sample_order* tests, and the agc_compute_pipeline_capture_optional_byte_cap timeout from its 256 MiB write to this machine's slow temporary folder.
  • The documented main-versus-change validation run (Khronos layer, the draw, vertex, index and snapshot tests) has no VUID- errors and the same 10 warnings on main's build (3ca07d086), on the head, and on the head with APS5_NO_BAR_SNAPSHOTS=1.

On the order with #8756: whichever is merged first stays as it is, and the other rebases its neighbouring lines in PrepareDrawBindings, which is a small change either way. If #8756 goes first, I will rebase this one.

The description has the new performance numbers for the head, measured against main on the same base.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342613746 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6342613746). Originally posted by [panicDa3m0n](https://github.com/panicDa3m0n) on 2026-10-22T13:59:39Z. --- Rebased onto current `main` (3ca07d086). The branch is now three commits, and the review fixes are the last two. @Scramblrrrr, both of your points are fixed: - 88d4e7bcb `fix(agc): keep index copies in host memory`. `HostReadableInput` is gone; the highest index and the mesh restart table are scanned from the copy the draw binds. `agc_draw_input_memory` copies indices, stores to the guest source, and checks the copy's memory and its highest index. It fails when index copies take the snapshot memory. - 82315210c `fix(agc): give mapped device-local buffers a host memory fallback`. A mapped device-local `Buffer`, slabs included, takes host memory in two cases: - when the reported budget of the device-local heap has no room for it, as `DeviceMemoryType` places device buffers; - when its allocation is still refused after the pool trim and the cache reclaim, as `RefusedDeviceMemoryFallback` does. Both cases print rate-limited lines (`[gpu] mapped buffer: ...`, `[bufferpool] ... placed in host memory type ...`), so a run under VRAM pressure shows when they happened. `MappedDevicePlacement` in `tests/BufferPool.cpp` checks a buffer and a slab within the budget, over it, and after a refusal. It fails without each of the placements. @MarcZX10, both blocking points are fixed in those two commits. On the updated tree: - `ctest -R ^agc_` passes except four tests that fail the same way on `main`'s build on this machine: the three `agc_driver_sample_order*` tests, and the `agc_compute_pipeline_capture_optional_byte_cap` timeout from its 256 MiB write to this machine's slow temporary folder. - The documented main-versus-change validation run (Khronos layer, the draw, vertex, index and snapshot tests) has no `VUID-` errors and the same 10 warnings on `main`'s build (3ca07d086), on the head, and on the head with `APS5_NO_BAR_SNAPSHOTS=1`. On the order with #8756: whichever is merged first stays as it is, and the other rebases its neighbouring lines in `PrepareDrawBindings`, which is a small change either way. If #8756 goes first, I will rebase this one. The description has the new performance numbers for the head, measured against `main` on the same base.
panicDa3m0n commented 2026-10-22 14:07:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by panicDa3m0n on 2026-10-22T14:07:16Z.


Traces of the six runs in the description (rounds 1, 2 and 3 there), each with its aps5-summary.jsonl line, one zip per round. The files are unchanged apart from the runN-main- or runN-pr- prefix, which gives their row in the table.

aps5-traces-pr9712-round1.zip
aps5-traces-pr9712-round2.zip
aps5-traces-pr9712-round3.zip

Run Build Trace
1 main 3ca07d086 run1-main-aps5-trace-3ca07d086d5f-13120.json.gz
2 this PR 82315210c run2-pr-aps5-trace-82315210ced9-12056.json.gz
3 main 3ca07d086 run3-main-aps5-trace-3ca07d086d5f-25904.json.gz
4 this PR 82315210c run4-pr-aps5-trace-82315210ced9-25932.json.gz
5 main 3ca07d086 run5-main-aps5-trace-3ca07d086d5f-23908.json.gz
6 this PR 82315210c run6-pr-aps5-trace-82315210ced9-4512.json.gz
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342776732 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#issuecomment-6342776732). Originally posted by [panicDa3m0n](https://github.com/panicDa3m0n) on 2026-10-22T14:07:16Z. --- Traces of the six runs in the description (rounds 1, 2 and 3 there), each with its `aps5-summary.jsonl` line, one zip per round. The files are unchanged apart from the `runN-main-` or `runN-pr-` prefix, which gives their row in the table. [aps5-traces-pr9712-round1.zip](https://github.com/user-attachments/files/33824053/aps5-traces-pr9712-round1.zip) [aps5-traces-pr9712-round2.zip](https://github.com/user-attachments/files/33824062/aps5-traces-pr9712-round2.zip) [aps5-traces-pr9712-round3.zip](https://github.com/user-attachments/files/33824078/aps5-traces-pr9712-round3.zip) | Run | Build | Trace | |---|---|---| | 1 | main `3ca07d086` | `run1-main-aps5-trace-3ca07d086d5f-13120.json.gz` | | 2 | this PR `82315210c` | `run2-pr-aps5-trace-82315210ced9-12056.json.gz` | | 3 | main `3ca07d086` | `run3-main-aps5-trace-3ca07d086d5f-25904.json.gz` | | 4 | this PR `82315210c` | `run4-pr-aps5-trace-82315210ced9-25932.json.gz` | | 5 | main `3ca07d086` | `run5-main-aps5-trace-3ca07d086d5f-23908.json.gz` | | 6 | this PR `82315210c` | `run6-pr-aps5-trace-82315210ced9-4512.json.gz` |
MarcZX10 commented 2026-10-22 15:41:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T15:41:22Z.

Review: CHANGES_REQUESTED


The PR contains title-specific Astro Bot performance measurements, so I am not treating it as a title-agnostic change. However, the baseline uses main 3ca07d086, not current main, and current main has since changed AGC draw code. Please rerun the comparison on current main so the reported performance evidence can be evaluated against the current code.

The branch is 19 commits behind main. Please update it and rerun the focused snapshot, draw-input and buffer-pool tests plus the main-vs-change performance run on the updated tree. Current hosted checks show conventions and labels passing, with no product build/test run. The author-reported AGC tests and Astro Bot A/B results have not been independently reproduced here.

The review also found a portability issue in Context::MappedBufferProperties: snapshot memory selection uses device-wide physical properties, but the buffer’s VkMemoryRequirements::memoryTypeBits may exclude the selected BAR type while allowing a host-visible type. In that case MemoryType(mask, flags) throws rather than falling back to HostBufferProperties. Please add a regression where the BAR type is excluded but a compatible host type remains. I syntax-checked the relevant production and test sources, and git diff --check and current-main conventions pass. The current hosted checks have no product build/test run.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5616873011 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5616873011). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T15:41:22Z. **Review:** CHANGES_REQUESTED --- The PR contains title-specific Astro Bot performance measurements, so I am not treating it as a title-agnostic change. However, the baseline uses main 3ca07d086, not current main, and current main has since changed AGC draw code. Please rerun the comparison on current main so the reported performance evidence can be evaluated against the current code. The branch is 19 commits behind main. Please update it and rerun the focused snapshot, draw-input and buffer-pool tests plus the main-vs-change performance run on the updated tree. Current hosted checks show conventions and labels passing, with no product build/test run. The author-reported AGC tests and Astro Bot A/B results have not been independently reproduced here. The review also found a portability issue in `Context::MappedBufferProperties`: snapshot memory selection uses device-wide physical properties, but the buffer’s `VkMemoryRequirements::memoryTypeBits` may exclude the selected BAR type while allowing a host-visible type. In that case `MemoryType(mask, flags)` throws rather than falling back to `HostBufferProperties`. Please add a regression where the BAR type is excluded but a compatible host type remains. I syntax-checked the relevant production and test sources, and `git diff --check` and current-main conventions pass. The current hosted checks have no product build/test run.
MarcZX10 commented 2026-10-22 16:14:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T16:14:04Z.

Review: COMMENTED


This follow-up is redundant: I removed the #5239 intake sentence from my prior review. The remaining requests concern current-main performance validation and the mapped-buffer fallback regression.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5617340919 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5617340919). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T16:14:04Z. **Review:** COMMENTED --- This follow-up is redundant: I removed the #5239 intake sentence from my prior review. The remaining requests concern current-main performance validation and the mapped-buffer fallback regression.
adriadam10 commented 2026-10-24 03:45:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-24T03:45:00Z.

Review: DISMISSED


The code has no open problem from our side; what blocks the merge queue is the CHANGES_REQUESTED from @MarcZX10, which only they or a new push can clear. Their points against the current head 174fe9b17a:

  • Index scans from the bound copy: fixed in 99f0ebbcf, covered by agc_draw_input_memory.
  • Host fallback for mapped device-local Buffer and slabs: fixed in c7bc487b6, covered by MappedDevicePlacement.
  • memoryTypeBits without a mapped device-local type: fixed in b8663c514, with the regression case requested.
  • Branch behind main: current main is merged into the head.
  • Performance on current main: the A/B in the description is against 8499ea52e. BunnyFl's RX 9070 XT run and Lander0606's RADV run were made on this head against current main, with and without APS5_NO_BAR_SNAPSHOTS=1. @panicDa3m0n offered to repeat the Astro Bot A/B on current main if that is still wanted.

@MarcZX10, could you re-review this head? If the remaining request is only the rerun of the Astro Bot A/B on current main, @panicDa3m0n, please post it so the review can be cleared.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5636697263 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5636697263). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-24T03:45:00Z. **Review:** DISMISSED --- The code has no open problem from our side; what blocks the merge queue is the CHANGES_REQUESTED from @MarcZX10, which only they or a new push can clear. Their points against the current head `174fe9b17a`: - Index scans from the bound copy: fixed in 99f0ebbcf, covered by `agc_draw_input_memory`. - Host fallback for mapped device-local `Buffer` and slabs: fixed in c7bc487b6, covered by `MappedDevicePlacement`. - `memoryTypeBits` without a mapped device-local type: fixed in b8663c514, with the regression case requested. - Branch behind `main`: current `main` is merged into the head. - Performance on current `main`: the A/B in the description is against 8499ea52e. BunnyFl's RX 9070 XT run and Lander0606's RADV run were made on this head against current `main`, with and without `APS5_NO_BAR_SNAPSHOTS=1`. @panicDa3m0n offered to repeat the Astro Bot A/B on current `main` if that is still wanted. @MarcZX10, could you re-review this head? If the remaining request is only the rerun of the Astro Bot A/B on current `main`, @panicDa3m0n, please post it so the review can be cleared.
MarcZX10 commented 2026-10-28 22:21:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T22:21:15Z.

Review: DISMISSED


I re-reviewed the latest head 4e93e34d8e0929f29032c4a81712e4dd899e65f7. The earlier code concerns about keeping index metadata with its copy, memoryTypeBits fallback, and fallback slab indexing have been addressed in later changes and the reported agc_buffer_pool regression checks are useful. The reported AMD measurements show 1.4–1.5 ms lower GPU-busy time on two Radeon systems, with little frame-time change on the CPU-bound RX 9060 XT run.

A new blocking result is the RTX 4090 A/B reported against the same main base: title/menu p50 worsened by about 2 ms (6–8%) in repeated quiet runs, while intro/level were unchanged. The current implementation enables BAR snapshots for any qualifying device, so the PR's current evidence shows a material regression on NVIDIA alongside the AMD gain. Please investigate the title/menu path and either address the regression or narrow the default enablement to hardware where the benefit is demonstrated; then rerun the same-machine main/head comparison and focused tests on the resolved head. GitHub currently reports this PR DIRTY / non-mergeable against current main, and the current head is 1,319 commits behind. The hosted checks shown are conventions and labels only; no product build/test is reported here. I did not run a local GPU build or performance test.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5690456400 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5690456400). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T22:21:15Z. **Review:** DISMISSED --- I re-reviewed the latest head `4e93e34d8e0929f29032c4a81712e4dd899e65f7`. The earlier code concerns about keeping index metadata with its copy, `memoryTypeBits` fallback, and fallback slab indexing have been addressed in later changes and the reported `agc_buffer_pool` regression checks are useful. The reported AMD measurements show 1.4–1.5 ms lower GPU-busy time on two Radeon systems, with little frame-time change on the CPU-bound RX 9060 XT run. A new blocking result is the RTX 4090 A/B reported against the same main base: title/menu p50 worsened by about 2 ms (6–8%) in repeated quiet runs, while intro/level were unchanged. The current implementation enables BAR snapshots for any qualifying device, so the PR's current evidence shows a material regression on NVIDIA alongside the AMD gain. Please investigate the title/menu path and either address the regression or narrow the default enablement to hardware where the benefit is demonstrated; then rerun the same-machine main/head comparison and focused tests on the resolved head. GitHub currently reports this PR `DIRTY` / non-mergeable against current `main`, and the current head is 1,319 commits behind. The hosted checks shown are conventions and labels only; no product build/test is reported here. I did not run a local GPU build or performance test.
XairRrR commented 2026-11-03 23:57:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T23:57:17Z.

Review: DISMISSED


Reviewed — changes requested

This pull request does not merge cleanly into main (1c8c0efc8c): head 4e93e34d8e conflicts in

  • core/libs/prx/libSceAgcDriver/CMakeLists.txt
  • core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp
  • core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp
  • core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5761187615 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5761187615). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T23:57:17Z. **Review:** DISMISSED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (1c8c0efc8c41314402e6966da5bef6ea3d639d10): head 4e93e34d8e0929f29032c4a81712e4dd899e65f7 conflicts in - `core/libs/prx/libSceAgcDriver/CMakeLists.txt` - `core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp` - `core/libs/prx/libSceAgcDriver/Graphics/src/Resources.cpp` - `core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=3556 head=4e93e34d8e0929f29032c4a81712e4dd899e65f7 -->
MarcZX10 commented 2026-11-14 10:24:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T10:24:28Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head d2c6c50c18b1dddaea609fd51ab83e722c4aaafe using the prepared diff and repo_read.py for targeted source context. No tests were run by me. The description reports Windows hardware tests and performance captures; those are author-reported.

Results

Check Result Note
Diff and targeted source review passed Memory placement and refresh paths inspected
Tests run by reviewer not run Author reports focused and full AGC test runs
Performance captures not run Author reports three alternating rounds

Findings

Blocking

None.

Non-blocking

  • The SnapshotMemoryProperties threshold treats any device-local heap of at least 4 GiB with a host-visible device-local type as a full resizable BAR. This is a heuristic; the description’s GPU testing supports the target device, while behavior on other Vulkan devices is not established here. Consider documenting the heuristic’s limits or using an explicit BAR capability signal if one is available.

Not verified

No tests, builds, or hardware runs were performed by me. The full text for Graphics/src/ShaderResources.cpp, tests/Graphics.cpp, and tests/Recorder.cpp was excluded from the review bundle; their changed hunks were inspected using repo_read.py. Other file contents were read from the bundle or targeted source ranges. Author-reported test and performance claims were not independently verified.

To get this to a good state

Nothing is required. The heuristic limitation above is optional feedback.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5903764542 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9712#pullrequestreview-5903764542). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T10:24:28Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `d2c6c50c18b1dddaea609fd51ab83e722c4aaafe` using the prepared diff and `repo_read.py` for targeted source context. No tests were run by me. The description reports Windows hardware tests and performance captures; those are author-reported. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Memory placement and refresh paths inspected | | Tests run by reviewer | not run | Author reports focused and full AGC test runs | | Performance captures | not run | Author reports three alternating rounds | ## Findings ### Blocking None. ### Non-blocking - The `SnapshotMemoryProperties` threshold treats any device-local heap of at least 4 GiB with a host-visible device-local type as a full resizable BAR. This is a heuristic; the description’s GPU testing supports the target device, while behavior on other Vulkan devices is not established here. Consider documenting the heuristic’s limits or using an explicit BAR capability signal if one is available. ## Not verified No tests, builds, or hardware runs were performed by me. The full text for `Graphics/src/ShaderResources.cpp`, `tests/Graphics.cpp`, and `tests/Recorder.cpp` was excluded from the review bundle; their changed hunks were inspected using `repo_read.py`. Other file contents were read from the bundle or targeted source ranges. Author-reported test and performance claims were not independently verified. ## To get this to a good state Nothing is required. The heuristic limitation above is optional feedback.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/9712:upstream-pr/9712'
git switch 'upstream-pr/9712'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/9712'
git switch 'upstream-pr/9712'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/9712'
git switch 'upstream-pr/9712'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/9712'
git switch 'main'
git merge --squash 'upstream-pr/9712'
git switch 'main'
git merge --ff-only 'upstream-pr/9712'
git switch 'main'
git merge 'upstream-pr/9712'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9712
No description provided.