perf(agc): probe the f32 denormal flush on KosmicKrisp for compute shaders #15859

Merged
Gonic0 merged 3 commits from upstream-pr/15859 into main 2026-11-07 12:37:28 +00:00
Gonic0 commented 2026-11-04 20:07:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Gonic0 on 2026-11-04T20:07:16Z.


What

KosmicKrisp (Mesa's Vulkan on Metal) declares no f32 denormal flush, like MoltenVK and NVIDIA's proprietary driver, so every shader keeps the emulated flush. It now runs the startup probe (ProbeFloat32FlushToZero) as those two do. On an Apple M5 Pro the probe matches (0 of 5472 results differ).

When it matches, only compute shaders get the hardware flush. Float32FlushControl gains computeOnly, set for VK_DRIVER_ID_MESA_KOSMICKRISP; VulkanDevice::Target() then leaves SpirvTarget::float32FlushToZero off, and ComputeTarget() sets it. Every graphics request is built from Target() and every compute request from ComputeTarget(), so graphics stages keep the emulated flush.

Graphics stages are left out because, with the flush in them too, Metal's shader compiler service (MTLCompilerService) drops its connection while KosmicKrisp builds one vertex/pixel pipeline of PPSA21564: pipeline creation returns VK_ERROR_INVALID_SHADER_NV and the title stops about 30 s in, in every run. The same pair compiles with the emulated flush, and the title runs with the hardware flush on MoltenVK. This is recorded as debt; ARCHITECTURE.md names KosmicKrisp and the compute-only rule.

The compute modules of PPSA21564 shrink by 17 to 23 % of their SPIR-V words, and their cold Metal compile time by 22 to 28 %.

Tested

macOS 27.2, Apple M5 Pro, Apple clang 21, x86-64 Release under Rosetta 2, KosmicKrisp built from Mesa main (x86-64, MESA_KK_DISABLE_WORKAROUNDS=10).

  • agc_float32_flush_control_tests gains two KosmicKrisp cases (computeOnly set, with and without a declared flush). It passes on this branch, on main 9f35c937da. With computeOnly forced off, it fails on both new cases.
  • VulkanDevice.cpp compiles on this branch. libkernel does not link on macOS on this main without the open macOS port pull requests, so the GPU tests and the title ran on a tree with them (main 04a9eb4fa2 plus those pull requests, #7514, #10743 and #15583, and lab switches that stay off), built once without and once with this commit.
  • The 63 f32/f16/denormal tests (ctest -R 'f32|f16|denorm|float32|mullit') on KosmicKrisp with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1: every startup logs f32 denormal flush: hardware. 56 pass, 7 fail: agc_driver_div_scale_fixup_f32_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_f32_arithmetic_nan, agc_driver_f32_constant_factor_tininess, agc_driver_f32_denormal_flush, agc_driver_interpolation_f16 and agc_driver_lds_add_f32. The same 7 fail with the same messages with APS5_NO_HW_F32_FLUSH=1 (emulated flush everywhere), e.g. f32 denormal flush: lane 8 no float mode v_fma_f32 v14, v4, v5, v6 is 0x00000000, expected 0x00800000 in both, so they are KosmicKrisp's and unrelated to this change.
  • PPSA21564 01.007.000, KosmicKrisp, alternating runs of 140 s with the same pad input; frames show no visible difference. With the drawing profile on (APS5_PROFILE_DRAW=1, not the Performance report form), mean presents per 10 s and GPU busy per frame from 95 to 140 s. The first round compiled 29 pipelines cold in both runs and is left out; the other rounds compiled none:
run presents / 10 s GPU busy per frame
main 194.6, 192.2 39.2, 39.2 ms
this change 201.0, 201.4 38.3, 38.2 ms

Performance report form captures, APS5_TRACE_FRAMES=1100:300 (an earlier part of the level than the window above), no APS5_PROFILE_* switch and no other APS5_TRACE_* switch than APS5_TRACE_DIR (the log goes to a file, as in #15583), alternating, same machine and session, no cold compiles:

pair frame p50 p90 p99 GPU busy per present
1, main 72.4 ms 85.4 ms 99.7 ms 56.0 ms
1, this change 71.1 ms 83.9 ms 95.9 ms 56.0 ms
2, main 72.6 ms 85.9 ms 99.0 ms 55.6 ms
2, this change 71.5 ms 83.5 ms 96.9 ms 55.9 ms

In this window the frame times are about 2 % shorter and GPU busy per present is unchanged; the window above, later in the level, is where the compute work is heaviest.

Summary lines (pair 2):

{"commit":"9d57532f1be6","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21706.970},"presents":300,"frame_ms":{"p50":72.623,"p90":85.905,"p99":99.026,"max":121.246},"gpu_busy_ms_per_present":55.646,"worker_busy_pct":{"queue worker 0x0":99.227,"queue worker 0x40":99.627,"queue worker 0x48":99.127,"queue worker 0x3a":0.000},"top_phases_ms_per_frame":{"Driver.Packet":215.159,"Driver.Packet.memory_wait":140.051,"Driver.Packet.prepare_memory":27.168,"Exp.FenceWait.idle":25.616,"Driver.Packet.draw":23.042,"Driver.Draw":22.989,"Graphics.Draw":20.708,"Graphics.Draw.draw_and_resource_release":12.600},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":14.270,"events_lost":201007,"totals_full":false}},"trace":"aps5-trace-9d57532f1be6-76377.json.gz"}
{"commit":"09e4d8069b2e","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21401.687},"presents":300,"frame_ms":{"p50":71.519,"p90":83.548,"p99":96.868,"max":116.126},"gpu_busy_ms_per_present":55.944,"worker_busy_pct":{"queue worker 0x0":99.239,"queue worker 0x40":99.615,"queue worker 0x48":98.940,"queue worker 0x3a":0.000},"top_phases_ms_per_frame":{"Driver.Packet":211.985,"Driver.Packet.memory_wait":137.948,"Driver.Packet.prepare_memory":27.526,"Exp.FenceWait.idle":26.017,"Driver.Packet.draw":22.269,"Driver.Draw":22.218,"Graphics.Draw":19.986,"Graphics.Draw.draw_and_resource_release":12.312},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":13.825,"events_lost":201483,"totals_full":false}},"trace":"aps5-trace-09e4d8069b2e-78355.json.gz"}

Traces:

tools/trace_digest.py for pair 2:

main (9d57532f1be6)

frames 1100:300 from present 1100: 300 presents, frame p50 72.6 / p90 85.9 / p99 99.0 / max 121.2 ms, GPU busy 55.6 ms per present
Apple M5 Pro, KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964), Darwin 27.2.0, 3840x2160, commit 9d57532f1be6, dropped: yes

{"commit":"9d57532f1be6","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21706.97},"presents":300,"frame_ms":{"p50":72.623,"p90":85.905,"p99":99.026,"max":121.246},"gpu_busy_ms_per_present":55.646,"worker_busy_pct":{"queue worker 0x0":99.227,"queue worker 0x40":99.627,"queue worker 0x48":99.127,"queue worker 0x3a":0.0},"top_phases_ms_per_frame":{"Driver.Packet":215.159,"Driver.Packet.memory_wait":140.051,"Driver.Packet.prepare_memory":27.168,"Exp.FenceWait.idle":25.616,"Driver.Packet.draw":23.042,"Driver.Draw":22.989,"Graphics.Draw":20.708,"Graphics.Draw.draw_and_resource_release":12.6},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":14.27,"events_lost":201007,"totals_full":false}},"trace":"aps5-trace-9d57532f1be6-76377.json.gz"}

Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.

  • queue worker 0x0: 201007 events lost; buffer full at 14270.2 ms

Slowest frames (largest slices inside each, inclusive)

  • present 1293: 121.2 ms at 13392 ms: Driver.Packet (queue worker 0x40) 120.7, Driver.Packet (queue worker 0x48) 120.3, Driver.Packet.memory_wait (queue worker 0x48) 119.7, Driver.Packet.memory_wait (queue worker 0x40) 117.5
  • present 1325: 101.4 ms at 15888 ms: Driver.Packet (queue worker 0x40) 100.9, Driver.Packet (queue worker 0x48) 100.5, Driver.Packet.memory_wait (queue worker 0x48) 99.8, Driver.Packet.memory_wait (queue worker 0x40) 96.3
  • present 1246: 99.0 ms at 10453 ms: Driver.Packet (queue worker 0x48) 98.9, Driver.Packet (queue worker 0x40) 98.4, Driver.Packet.memory_wait (queue worker 0x48) 98.2, Driver.Packet.memory_wait (queue worker 0x40) 95.5
  • present 1323: 93.7 ms at 15720 ms: Driver.Packet (queue worker 0x40) 92.8, Driver.Packet (queue worker 0x48) 92.7, Driver.Packet.memory_wait (queue worker 0x48) 91.3, Driver.Packet.memory_wait (queue worker 0x40) 89.4
  • present 1318: 93.3 ms at 15283 ms: Driver.Packet (queue worker 0x48) 93.1, Driver.Packet (queue worker 0x40) 92.5, Driver.Packet.memory_wait (queue worker 0x48) 91.7, Driver.Packet.memory_wait (queue worker 0x40) 86.6

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

  • present 1293: 121.2 ms at 13392 ms, persistence 69.9 ms
  • present 1246: 99.0 ms at 10453 ms, persistence 39.4 ms
  • present 1325: 101.4 ms at 15888 ms, persistence 35.8 ms
  • present 1178: 92.0 ms at 5538 ms, persistence 30.4 ms
  • present 1101: 75.4 ms at 51 ms, persistence 23.2 ms
  • present 1323: 93.7 ms at 15720 ms, persistence 19.8 ms
  • present 1209: 89.1 ms at 8019 ms, persistence 19.6 ms
  • present 1229: 80.3 ms at 9363 ms, persistence 17.8 ms
  • present 1357: 85.5 ms at 18236 ms, persistence 14.9 ms
  • present 1318: 93.3 ms at 15283 ms, persistence 14.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 22.3 (31 %) 20.3 (28 %) 29.7 14.3 Driver.Packet 42.5, Driver.Completion 0.1
title 0.1 (0 %) 0.0 (0 %) 72.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 72.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 72.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 72.3 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
queue worker 0x40 1.8 (2 %) 69.9 (97 %) 0.7 2.0 Driver.Packet 71.5, Driver.EndSubmission 0.1
queue worker 0x48 0.3 (0 %) 71.7 (99 %) 0.3 0.2 Driver.Packet 71.6, Driver.EndSubmission 0.1
draw committer 17.5 (24 %) 0.9 (1 %) 54.0 10.8 Graphics.Draw 12.9, Recorder.Reap 1.9
presenter 1.2 (2 %) 1.8 (2 %) 69.3 0.0 VideoOut.Flip 3.0, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 72.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 55.7 (77 %) 0.0 (0 %) 16.6 0.0 batch 55.7

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 185.6, Driver.Packet.memory_wait 140.0, batch 55.7, Driver.Packet.prepare_memory 18.8, Graphics.Draw 18.0, Exp.FenceWait.idle 17.9, Driver.Packet.draw 13.8, Driver.Draw 13.8, Graphics.Draw.draw_and_resource_release 12.0, Driver.Packet.dispatch 7.4

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x48) 119.8 ms at 13397 ms, present 1293
  • Driver.Packet.memory_wait (queue worker 0x48) 99.3 ms at 15894 ms, present 1325
  • Driver.Packet.memory_wait (queue worker 0x48) 98.4 ms at 15289 ms, present 1318
  • Driver.Packet.memory_wait (queue worker 0x48) 98.2 ms at 10457 ms, present 1246
  • Driver.Packet.memory_wait (queue worker 0x40) 92.1 ms at 13346 ms, present 1292
  • Driver.Packet.memory_wait (queue worker 0x40) 91.1 ms at 15907 ms, present 1325
  • Driver.Packet.memory_wait (queue worker 0x48) 91.0 ms at 15727 ms, present 1323
  • Driver.Packet.memory_wait (queue worker 0x40) 90.5 ms at 15307 ms, present 1318
  • Driver.Packet.memory_wait (queue worker 0x48) 90.3 ms at 5543 ms, present 1178
  • Driver.Packet.memory_wait (queue worker 0x48) 89.7 ms at 15635 ms, present 1322

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

  • batch 5481: 36.9 ms at 6196 ms, present 1185: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 30.8, Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Recorder.Submit (draw committer) 0.0
  • batch 5094: 36.5 ms at 5663 ms, present 1179: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 28.7, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 5350: 36.4 ms at 6020 ms, present 1183: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.0, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0
  • batch 5415: 35.7 ms at 6108 ms, present 1184: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 28.5, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.0
  • batch 5158: 35.5 ms at 5753 ms, present 1180: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 27.5, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Exp.Submitted (draw committer) 0.0
this change (09e4d8069b2e)

frames 1100:300 from present 1100: 300 presents, frame p50 71.5 / p90 83.5 / p99 96.9 / max 116.1 ms, GPU busy 55.9 ms per present
Apple M5 Pro, KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964), Darwin 27.2.0, 3840x2160, commit 09e4d8069b2e, dropped: yes

{"commit":"09e4d8069b2e","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21401.687},"presents":300,"frame_ms":{"p50":71.519,"p90":83.548,"p99":96.868,"max":116.126},"gpu_busy_ms_per_present":55.944,"worker_busy_pct":{"queue worker 0x0":99.239,"queue worker 0x40":99.615,"queue worker 0x48":98.94,"queue worker 0x3a":0.0},"top_phases_ms_per_frame":{"Driver.Packet":211.985,"Driver.Packet.memory_wait":137.948,"Driver.Packet.prepare_memory":27.526,"Exp.FenceWait.idle":26.017,"Driver.Packet.draw":22.269,"Driver.Draw":22.218,"Graphics.Draw":19.986,"Graphics.Draw.draw_and_resource_release":12.312},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":13.825,"events_lost":201483,"totals_full":false}},"trace":"aps5-trace-09e4d8069b2e-78355.json.gz"}

Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.

  • queue worker 0x0: 201483 events lost; buffer full at 13824.7 ms

Slowest frames (largest slices inside each, inclusive)

  • present 1283: 116.1 ms at 12597 ms: Driver.Packet (queue worker 0x40) 115.7, Driver.Packet (queue worker 0x48) 115.5, Driver.Packet.memory_wait (queue worker 0x48) 114.9, Driver.Packet.memory_wait (queue worker 0x40) 112.4
  • present 1231: 100.7 ms at 9421 ms: Driver.Packet (queue worker 0x48) 100.6, Driver.Packet (queue worker 0x40) 100.0, Driver.Packet.memory_wait (queue worker 0x48) 100.0, Driver.Packet.memory_wait (queue worker 0x40) 97.1
  • present 1316: 96.9 ms at 15013 ms: Driver.Packet (queue worker 0x40) 96.4, Driver.Packet (queue worker 0x48) 95.7, Driver.Packet.memory_wait (queue worker 0x48) 95.0, Driver.Packet.memory_wait (queue worker 0x40) 93.3
  • present 1163: 89.5 ms at 4572 ms: Driver.Packet (queue worker 0x48) 89.4, Driver.Packet.memory_wait (queue worker 0x48) 88.9, Driver.Packet (queue worker 0x40) 88.8, Driver.Packet.memory_wait (queue worker 0x40) 86.9
  • present 1166: 88.5 ms at 4836 ms: Driver.Packet (queue worker 0x48) 88.1, Driver.Packet (queue worker 0x40) 87.9, Driver.Packet.memory_wait (queue worker 0x48) 87.5, Driver.Packet.memory_wait (queue worker 0x40) 85.5

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

  • present 1283: 116.1 ms at 12597 ms, persistence 60.8 ms
  • present 1231: 100.7 ms at 9421 ms, persistence 41.8 ms
  • present 1316: 96.9 ms at 15013 ms, persistence 32.9 ms
  • present 1163: 89.5 ms at 4572 ms, persistence 29.5 ms
  • present 1194: 86.6 ms at 7014 ms, persistence 17.4 ms
  • present 1214: 79.1 ms at 8328 ms, persistence 17.3 ms
  • present 1348: 82.7 ms at 17313 ms, persistence 12.9 ms
  • present 1222: 69.1 ms at 8832 ms, persistence 5.8 ms
  • present 1399: 79.9 ms at 21322 ms, persistence 3.9 ms
  • present 1302: 74.5 ms at 13992 ms, persistence 3.7 ms

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 22.0 (31 %) 19.4 (27 %) 30.0 14.3 Driver.Packet 41.2, Driver.Completion 0.1
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
shader prepare 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.PrepareArtifact 0.0
title 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 71.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.1 (0 %) 0.0 (0 %) 71.2 0.0 Shader.ResolveAbi 0.1, Shader.Register 0.0
title 0.0 (0 %) 0.0 (0 %) 71.3 0.1 Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 71.3 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
queue worker 0x40 1.8 (2 %) 68.9 (97 %) 0.7 1.9 Driver.Packet 70.5, Driver.EndSubmission 0.1
draw committer 16.9 (24 %) 0.9 (1 %) 53.6 10.9 Graphics.Draw 12.6, Recorder.Submit 1.7
queue worker 0x48 0.3 (0 %) 70.8 (99 %) 0.3 0.2 Driver.Packet 70.4, Driver.EndSubmission 0.1
presenter 1.2 (2 %) 1.8 (3 %) 68.3 0.0 VideoOut.Flip 3.0, Driver.Present 0.0
title 0.0 (0 %) 0.0 (0 %) 71.3 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 56.0 (79 %) 0.0 (0 %) 15.3 0.0 batch 56.0

Largest slices (ms per frame, inclusive, all threads): Driver.Packet 182.1, Driver.Packet.memory_wait 137.9, batch 56.0, Driver.Packet.prepare_memory 18.4, Exp.FenceWait.idle 17.5, Graphics.Draw 17.2, Driver.Packet.draw 13.2, Driver.Draw 13.1, Graphics.Draw.draw_and_resource_release 11.7, Driver.Packet.dispatch 7.3

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x48) 115.2 ms at 12602 ms, present 1283
  • Driver.Packet.memory_wait (queue worker 0x48) 100.4 ms at 9425 ms, present 1231
  • Driver.Packet.memory_wait (queue worker 0x48) 94.2 ms at 15019 ms, present 1316
  • Driver.Packet.memory_wait (queue worker 0x40) 89.9 ms at 15029 ms, present 1316
  • Driver.Packet.memory_wait (queue worker 0x48) 88.7 ms at 4576 ms, present 1163
  • Driver.Packet.memory_wait (queue worker 0x40) 88.5 ms at 12552 ms, present 1282
  • Driver.Packet.memory_wait (queue worker 0x48) 87.4 ms at 5016 ms, present 1168
  • Driver.Packet.memory_wait (queue worker 0x48) 87.4 ms at 4840 ms, present 1166
  • Driver.Packet.memory_wait (queue worker 0x48) 86.8 ms at 4928 ms, present 1167
  • Driver.Packet.memory_wait (queue worker 0x48) 86.2 ms at 4753 ms, present 1165

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

  • batch 4401: 38.2 ms at 5042 ms, present 1168: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 32.1, Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Recorder.Submit (draw committer) 0.0
  • batch 4532: 35.6 ms at 5216 ms, present 1170: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.0
  • batch 4468: 35.5 ms at 5130 ms, present 1169: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Exp.Submitted (draw committer) 0.0
  • batch 4203: 35.4 ms at 4780 ms, present 1165: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.0, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Exp.Submitted (draw committer) 0.0
  • batch 4139: 35.3 ms at 4693 ms, present 1164: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 27.8, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0

Overlap

tools/pr_overlap.py reports text conflicts only:

  • #15122 edits other words of the same ARCHITECTURE.md paragraph (the probe programs' location).
  • #15719 adds a neighbouring field to VulkanDevice's state (an f16 NaN probe for RDNA).
  • #11587 adds a neighbouring debt entry.

None of them changes the f32 flush control.

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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Apple M5 Pro, KosmicKrisp (Mesa main), macOS 27.2
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5160832675 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15859). Originally posted by [Gonic0](https://github.com/Gonic0) on 2026-11-04T20:07:16Z. --- ### What KosmicKrisp (Mesa's Vulkan on Metal) declares no f32 denormal flush, like MoltenVK and NVIDIA's proprietary driver, so every shader keeps the emulated flush. It now runs the startup probe (`ProbeFloat32FlushToZero`) as those two do. On an Apple M5 Pro the probe matches (0 of 5472 results differ). When it matches, only compute shaders get the hardware flush. `Float32FlushControl` gains `computeOnly`, set for `VK_DRIVER_ID_MESA_KOSMICKRISP`; `VulkanDevice::Target()` then leaves `SpirvTarget::float32FlushToZero` off, and `ComputeTarget()` sets it. Every graphics request is built from `Target()` and every compute request from `ComputeTarget()`, so graphics stages keep the emulated flush. Graphics stages are left out because, with the flush in them too, Metal's shader compiler service (`MTLCompilerService`) drops its connection while KosmicKrisp builds one vertex/pixel pipeline of PPSA21564: pipeline creation returns `VK_ERROR_INVALID_SHADER_NV` and the title stops about 30 s in, in every run. The same pair compiles with the emulated flush, and the title runs with the hardware flush on MoltenVK. This is recorded as debt; `ARCHITECTURE.md` names KosmicKrisp and the compute-only rule. The compute modules of PPSA21564 shrink by 17 to 23 % of their SPIR-V words, and their cold Metal compile time by 22 to 28 %. ### Tested macOS 27.2, Apple M5 Pro, Apple clang 21, x86-64 Release under Rosetta 2, KosmicKrisp built from Mesa `main` (x86-64, `MESA_KK_DISABLE_WORKAROUNDS=10`). - `agc_float32_flush_control_tests` gains two KosmicKrisp cases (`computeOnly` set, with and without a declared flush). It passes on this branch, on `main` `9f35c937da`. With `computeOnly` forced off, it fails on both new cases. - `VulkanDevice.cpp` compiles on this branch. `libkernel` does not link on macOS on this `main` without the open macOS port pull requests, so the GPU tests and the title ran on a tree with them (`main` `04a9eb4fa2` plus those pull requests, #7514, #10743 and #15583, and lab switches that stay off), built once without and once with this commit. - The 63 f32/f16/denormal tests (`ctest -R 'f32|f16|denorm|float32|mullit'`) on KosmicKrisp with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`: every startup logs `f32 denormal flush: hardware`. 56 pass, 7 fail: `agc_driver_div_scale_fixup_f32_denormal_modes`, `agc_driver_f16_fma_invalid_nan`, `agc_driver_f32_arithmetic_nan`, `agc_driver_f32_constant_factor_tininess`, `agc_driver_f32_denormal_flush`, `agc_driver_interpolation_f16` and `agc_driver_lds_add_f32`. The same 7 fail with the same messages with `APS5_NO_HW_F32_FLUSH=1` (emulated flush everywhere), e.g. `f32 denormal flush: lane 8 no float mode v_fma_f32 v14, v4, v5, v6 is 0x00000000, expected 0x00800000` in both, so they are KosmicKrisp's and unrelated to this change. - PPSA21564 01.007.000, KosmicKrisp, alternating runs of 140 s with the same pad input; frames show no visible difference. With the drawing profile on (`APS5_PROFILE_DRAW=1`, not the Performance report form), mean presents per 10 s and GPU busy per frame from 95 to 140 s. The first round compiled 29 pipelines cold in both runs and is left out; the other rounds compiled none: | run | presents / 10 s | GPU busy per frame | |---|---|---| | `main` | 194.6, 192.2 | 39.2, 39.2 ms | | this change | 201.0, 201.4 | 38.3, 38.2 ms | Performance report form captures, `APS5_TRACE_FRAMES=1100:300` (an earlier part of the level than the window above), no `APS5_PROFILE_*` switch and no other `APS5_TRACE_*` switch than `APS5_TRACE_DIR` (the log goes to a file, as in #15583), alternating, same machine and session, no cold compiles: | pair | frame p50 | p90 | p99 | GPU busy per present | |---|---|---|---|---| | 1, `main` | 72.4 ms | 85.4 ms | 99.7 ms | 56.0 ms | | 1, this change | 71.1 ms | 83.9 ms | 95.9 ms | 56.0 ms | | 2, `main` | 72.6 ms | 85.9 ms | 99.0 ms | 55.6 ms | | 2, this change | 71.5 ms | 83.5 ms | 96.9 ms | 55.9 ms | In this window the frame times are about 2 % shorter and GPU busy per present is unchanged; the window above, later in the level, is where the compute work is heaviest. Summary lines (pair 2): ```json {"commit":"9d57532f1be6","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21706.970},"presents":300,"frame_ms":{"p50":72.623,"p90":85.905,"p99":99.026,"max":121.246},"gpu_busy_ms_per_present":55.646,"worker_busy_pct":{"queue worker 0x0":99.227,"queue worker 0x40":99.627,"queue worker 0x48":99.127,"queue worker 0x3a":0.000},"top_phases_ms_per_frame":{"Driver.Packet":215.159,"Driver.Packet.memory_wait":140.051,"Driver.Packet.prepare_memory":27.168,"Exp.FenceWait.idle":25.616,"Driver.Packet.draw":23.042,"Driver.Draw":22.989,"Graphics.Draw":20.708,"Graphics.Draw.draw_and_resource_release":12.600},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":14.270,"events_lost":201007,"totals_full":false}},"trace":"aps5-trace-9d57532f1be6-76377.json.gz"} {"commit":"09e4d8069b2e","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21401.687},"presents":300,"frame_ms":{"p50":71.519,"p90":83.548,"p99":96.868,"max":116.126},"gpu_busy_ms_per_present":55.944,"worker_busy_pct":{"queue worker 0x0":99.239,"queue worker 0x40":99.615,"queue worker 0x48":98.940,"queue worker 0x3a":0.000},"top_phases_ms_per_frame":{"Driver.Packet":211.985,"Driver.Packet.memory_wait":137.948,"Driver.Packet.prepare_memory":27.526,"Exp.FenceWait.idle":26.017,"Driver.Packet.draw":22.269,"Driver.Draw":22.218,"Graphics.Draw":19.986,"Graphics.Draw.draw_and_resource_release":12.312},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":13.825,"events_lost":201483,"totals_full":false}},"trace":"aps5-trace-09e4d8069b2e-78355.json.gz"} ``` Traces: - pair 1, `main`: [aps5-trace-9d57532f1be6-69802.json.gz](https://github.com/user-attachments/files/34391734/aps5-trace-9d57532f1be6-69802.json.gz) - pair 1, this change: [aps5-trace-09e4d8069b2e-74246.json.gz](https://github.com/user-attachments/files/34391746/aps5-trace-09e4d8069b2e-74246.json.gz) - pair 2, `main`: [aps5-trace-9d57532f1be6-76377.json.gz](https://github.com/user-attachments/files/34391751/aps5-trace-9d57532f1be6-76377.json.gz) - pair 2, this change: [aps5-trace-09e4d8069b2e-78355.json.gz](https://github.com/user-attachments/files/34391759/aps5-trace-09e4d8069b2e-78355.json.gz) `tools/trace_digest.py` for pair 2: <details><summary><code>main</code> (9d57532f1be6)</summary> **frames 1100:300** from present 1100: 300 presents, frame p50 72.6 / p90 85.9 / p99 99.0 / max 121.2 ms, GPU busy 55.6 ms per present Apple M5 Pro, KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964), Darwin 27.2.0, 3840x2160, commit 9d57532f1be6, dropped: yes ```json {"commit":"9d57532f1be6","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21706.97},"presents":300,"frame_ms":{"p50":72.623,"p90":85.905,"p99":99.026,"max":121.246},"gpu_busy_ms_per_present":55.646,"worker_busy_pct":{"queue worker 0x0":99.227,"queue worker 0x40":99.627,"queue worker 0x48":99.127,"queue worker 0x3a":0.0},"top_phases_ms_per_frame":{"Driver.Packet":215.159,"Driver.Packet.memory_wait":140.051,"Driver.Packet.prepare_memory":27.168,"Exp.FenceWait.idle":25.616,"Driver.Packet.draw":23.042,"Driver.Draw":22.989,"Graphics.Draw":20.708,"Graphics.Draw.draw_and_resource_release":12.6},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":14.27,"events_lost":201007,"totals_full":false}},"trace":"aps5-trace-9d57532f1be6-76377.json.gz"} ``` **Incomplete trace:** recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately. - queue worker 0x0: 201007 events lost; buffer full at 14270.2 ms **Slowest frames** (largest slices inside each, inclusive) - present 1293: 121.2 ms at 13392 ms: Driver.Packet (queue worker 0x40) 120.7, Driver.Packet (queue worker 0x48) 120.3, Driver.Packet.memory_wait (queue worker 0x48) 119.7, Driver.Packet.memory_wait (queue worker 0x40) 117.5 - present 1325: 101.4 ms at 15888 ms: Driver.Packet (queue worker 0x40) 100.9, Driver.Packet (queue worker 0x48) 100.5, Driver.Packet.memory_wait (queue worker 0x48) 99.8, Driver.Packet.memory_wait (queue worker 0x40) 96.3 - present 1246: 99.0 ms at 10453 ms: Driver.Packet (queue worker 0x48) 98.9, Driver.Packet (queue worker 0x40) 98.4, Driver.Packet.memory_wait (queue worker 0x48) 98.2, Driver.Packet.memory_wait (queue worker 0x40) 95.5 - present 1323: 93.7 ms at 15720 ms: Driver.Packet (queue worker 0x40) 92.8, Driver.Packet (queue worker 0x48) 92.7, Driver.Packet.memory_wait (queue worker 0x48) 91.3, Driver.Packet.memory_wait (queue worker 0x40) 89.4 - present 1318: 93.3 ms at 15283 ms: Driver.Packet (queue worker 0x48) 93.1, Driver.Packet (queue worker 0x40) 92.5, Driver.Packet.memory_wait (queue worker 0x48) 91.7, Driver.Packet.memory_wait (queue worker 0x40) 86.6 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 1293: 121.2 ms at 13392 ms, persistence 69.9 ms - present 1246: 99.0 ms at 10453 ms, persistence 39.4 ms - present 1325: 101.4 ms at 15888 ms, persistence 35.8 ms - present 1178: 92.0 ms at 5538 ms, persistence 30.4 ms - present 1101: 75.4 ms at 51 ms, persistence 23.2 ms - present 1323: 93.7 ms at 15720 ms, persistence 19.8 ms - present 1209: 89.1 ms at 8019 ms, persistence 19.6 ms - present 1229: 80.3 ms at 9363 ms, persistence 17.8 ms - present 1357: 85.5 ms at 18236 ms, persistence 14.9 ms - present 1318: 93.3 ms at 15283 ms, persistence 14.7 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 22.3 (31 %) | 20.3 (28 %) | 29.7 | 14.3 | Driver.Packet 42.5, Driver.Completion 0.1 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 72.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 72.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 72.3 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | queue worker 0x40 | 1.8 (2 %) | 69.9 (97 %) | 0.7 | 2.0 | Driver.Packet 71.5, Driver.EndSubmission 0.1 | | queue worker 0x48 | 0.3 (0 %) | 71.7 (99 %) | 0.3 | 0.2 | Driver.Packet 71.6, Driver.EndSubmission 0.1 | | draw committer | 17.5 (24 %) | 0.9 (1 %) | 54.0 | 10.8 | Graphics.Draw 12.9, Recorder.Reap 1.9 | | presenter | 1.2 (2 %) | 1.8 (2 %) | 69.3 | 0.0 | VideoOut.Flip 3.0, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 72.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 55.7 (77 %) | 0.0 (0 %) | 16.6 | 0.0 | batch 55.7 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 185.6, Driver.Packet.memory_wait 140.0, batch 55.7, Driver.Packet.prepare_memory 18.8, Graphics.Draw 18.0, Exp.FenceWait.idle 17.9, Driver.Packet.draw 13.8, Driver.Draw 13.8, Graphics.Draw.draw_and_resource_release 12.0, Driver.Packet.dispatch 7.4 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x48) 119.8 ms at 13397 ms, present 1293 - Driver.Packet.memory_wait (queue worker 0x48) 99.3 ms at 15894 ms, present 1325 - Driver.Packet.memory_wait (queue worker 0x48) 98.4 ms at 15289 ms, present 1318 - Driver.Packet.memory_wait (queue worker 0x48) 98.2 ms at 10457 ms, present 1246 - Driver.Packet.memory_wait (queue worker 0x40) 92.1 ms at 13346 ms, present 1292 - Driver.Packet.memory_wait (queue worker 0x40) 91.1 ms at 15907 ms, present 1325 - Driver.Packet.memory_wait (queue worker 0x48) 91.0 ms at 15727 ms, present 1323 - Driver.Packet.memory_wait (queue worker 0x40) 90.5 ms at 15307 ms, present 1318 - Driver.Packet.memory_wait (queue worker 0x48) 90.3 ms at 5543 ms, present 1178 - Driver.Packet.memory_wait (queue worker 0x48) 89.7 ms at 15635 ms, present 1322 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 5481: 36.9 ms at 6196 ms, present 1185: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 30.8, Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Recorder.Submit (draw committer) 0.0 - batch 5094: 36.5 ms at 5663 ms, present 1179: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 28.7, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0 - batch 5350: 36.4 ms at 6020 ms, present 1183: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.0, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0 - batch 5415: 35.7 ms at 6108 ms, present 1184: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 28.5, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.0 - batch 5158: 35.5 ms at 5753 ms, present 1180: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 27.5, Graphics.Draw (draw committer) 0.5, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Exp.Submitted (draw committer) 0.0 </details> <details><summary>this change (09e4d8069b2e)</summary> **frames 1100:300** from present 1100: 300 presents, frame p50 71.5 / p90 83.5 / p99 96.9 / max 116.1 ms, GPU busy 55.9 ms per present Apple M5 Pro, KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964), Darwin 27.2.0, 3840x2160, commit 09e4d8069b2e, dropped: yes ```json {"commit":"09e4d8069b2e","dirty":null,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_FRAMES":"1100:300"},"gpu":"Apple M5 Pro","driver":"KosmicKrisp Mesa 27.0.0-devel (git-b5b73e5964)","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":18,"memory_mib":49152,"title_id":"PPSA21564","title":"ASTRO BOT","content_version":"01.007.000","resolution":"3840x2160","window":{"spec":"frames 1100:300","first_present":1100,"ms":21401.687},"presents":300,"frame_ms":{"p50":71.519,"p90":83.548,"p99":96.868,"max":116.126},"gpu_busy_ms_per_present":55.944,"worker_busy_pct":{"queue worker 0x0":99.239,"queue worker 0x40":99.615,"queue worker 0x48":98.94,"queue worker 0x3a":0.0},"top_phases_ms_per_frame":{"Driver.Packet":211.985,"Driver.Packet.memory_wait":137.948,"Driver.Packet.prepare_memory":27.526,"Exp.FenceWait.idle":26.017,"Driver.Packet.draw":22.269,"Driver.Draw":22.218,"Graphics.Draw":19.986,"Graphics.Draw.draw_and_resource_release":12.312},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":13.825,"events_lost":201483,"totals_full":false}},"trace":"aps5-trace-09e4d8069b2e-78355.json.gz"} ``` **Incomplete trace:** recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately. - queue worker 0x0: 201483 events lost; buffer full at 13824.7 ms **Slowest frames** (largest slices inside each, inclusive) - present 1283: 116.1 ms at 12597 ms: Driver.Packet (queue worker 0x40) 115.7, Driver.Packet (queue worker 0x48) 115.5, Driver.Packet.memory_wait (queue worker 0x48) 114.9, Driver.Packet.memory_wait (queue worker 0x40) 112.4 - present 1231: 100.7 ms at 9421 ms: Driver.Packet (queue worker 0x48) 100.6, Driver.Packet (queue worker 0x40) 100.0, Driver.Packet.memory_wait (queue worker 0x48) 100.0, Driver.Packet.memory_wait (queue worker 0x40) 97.1 - present 1316: 96.9 ms at 15013 ms: Driver.Packet (queue worker 0x40) 96.4, Driver.Packet (queue worker 0x48) 95.7, Driver.Packet.memory_wait (queue worker 0x48) 95.0, Driver.Packet.memory_wait (queue worker 0x40) 93.3 - present 1163: 89.5 ms at 4572 ms: Driver.Packet (queue worker 0x48) 89.4, Driver.Packet.memory_wait (queue worker 0x48) 88.9, Driver.Packet (queue worker 0x40) 88.8, Driver.Packet.memory_wait (queue worker 0x40) 86.9 - present 1166: 88.5 ms at 4836 ms: Driver.Packet (queue worker 0x48) 88.1, Driver.Packet (queue worker 0x40) 87.9, Driver.Packet.memory_wait (queue worker 0x48) 87.5, Driver.Packet.memory_wait (queue worker 0x40) 85.5 **Persistent spikes** (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame) - present 1283: 116.1 ms at 12597 ms, persistence 60.8 ms - present 1231: 100.7 ms at 9421 ms, persistence 41.8 ms - present 1316: 96.9 ms at 15013 ms, persistence 32.9 ms - present 1163: 89.5 ms at 4572 ms, persistence 29.5 ms - present 1194: 86.6 ms at 7014 ms, persistence 17.4 ms - present 1214: 79.1 ms at 8328 ms, persistence 17.3 ms - present 1348: 82.7 ms at 17313 ms, persistence 12.9 ms - present 1222: 69.1 ms at 8832 ms, persistence 5.8 ms - present 1399: 79.9 ms at 21322 ms, persistence 3.9 ms - present 1302: 74.5 ms at 13992 ms, persistence 3.7 ms **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 22.0 (31 %) | 19.4 (27 %) | 30.0 | 14.3 | Driver.Packet 41.2, Driver.Completion 0.1 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | shader prepare | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.PrepareArtifact 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 71.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 71.2 | 0.0 | Shader.ResolveAbi 0.1, Shader.Register 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.1 | Shader.ResolveGraphicsAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | queue worker 0x40 | 1.8 (2 %) | 68.9 (97 %) | 0.7 | 1.9 | Driver.Packet 70.5, Driver.EndSubmission 0.1 | | draw committer | 16.9 (24 %) | 0.9 (1 %) | 53.6 | 10.9 | Graphics.Draw 12.6, Recorder.Submit 1.7 | | queue worker 0x48 | 0.3 (0 %) | 70.8 (99 %) | 0.3 | 0.2 | Driver.Packet 70.4, Driver.EndSubmission 0.1 | | presenter | 1.2 (2 %) | 1.8 (3 %) | 68.3 | 0.0 | VideoOut.Flip 3.0, Driver.Present 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 71.3 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 56.0 (79 %) | 0.0 (0 %) | 15.3 | 0.0 | batch 56.0 | **Largest slices** (ms per frame, inclusive, all threads): Driver.Packet 182.1, Driver.Packet.memory_wait 137.9, batch 56.0, Driver.Packet.prepare_memory 18.4, Exp.FenceWait.idle 17.5, Graphics.Draw 17.2, Driver.Packet.draw 13.2, Driver.Draw 13.1, Graphics.Draw.draw_and_resource_release 11.7, Driver.Packet.dispatch 7.3 **Longest waits** - Driver.Packet.memory_wait (queue worker 0x48) 115.2 ms at 12602 ms, present 1283 - Driver.Packet.memory_wait (queue worker 0x48) 100.4 ms at 9425 ms, present 1231 - Driver.Packet.memory_wait (queue worker 0x48) 94.2 ms at 15019 ms, present 1316 - Driver.Packet.memory_wait (queue worker 0x40) 89.9 ms at 15029 ms, present 1316 - Driver.Packet.memory_wait (queue worker 0x48) 88.7 ms at 4576 ms, present 1163 - Driver.Packet.memory_wait (queue worker 0x40) 88.5 ms at 12552 ms, present 1282 - Driver.Packet.memory_wait (queue worker 0x48) 87.4 ms at 5016 ms, present 1168 - Driver.Packet.memory_wait (queue worker 0x48) 87.4 ms at 4840 ms, present 1166 - Driver.Packet.memory_wait (queue worker 0x48) 86.8 ms at 4928 ms, present 1167 - Driver.Packet.memory_wait (queue worker 0x48) 86.2 ms at 4753 ms, present 1165 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 4401: 38.2 ms at 5042 ms, present 1168: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 32.1, Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.8, Recorder.Submit (draw committer) 0.0 - batch 4532: 35.6 ms at 5216 ms, present 1170: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.0 - batch 4468: 35.5 ms at 5130 ms, present 1169: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.1, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Exp.Submitted (draw committer) 0.0 - batch 4203: 35.4 ms at 4780 ms, present 1165: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 29.0, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Exp.Submitted (draw committer) 0.0 - batch 4139: 35.3 ms at 4693 ms, present 1164: GPU no ranges; recorded by Exp.FenceWait.idle (queue worker 0x0) 27.8, Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.0 </details> ### Overlap `tools/pr_overlap.py` reports text conflicts only: - #15122 edits other words of the same `ARCHITECTURE.md` paragraph (the probe programs' location). - #15719 adds a neighbouring field to `VulkanDevice`'s state (an f16 NaN probe for RDNA). - #11587 adds a neighbouring debt entry. None of them changes the f32 flush control. ### 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 (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Apple M5 Pro, KosmicKrisp (Mesa `main`), macOS 27.2 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15859
No description provided.