perf(shader): simplify float max with a positive zero lhs #12287

Merged
Filip722 merged 10 commits from upstream-pr/12287 into main 2026-10-30 14:21:56 +00:00
Filip722 commented 2026-10-28 07:35:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Filip722 on 2026-10-28T07:35:43Z.


What

max(+0, value) currently uses the general f32 min/max lowering, including NaN classification, a signed-zero check and multiple selects. The camp scene executes this sequence repeatedly in a costly fragment shader.

  • For a literal positive-zero left operand, emit one ordered value > +0 comparison and select value or +0.
  • Keep all other min/max cases on the existing lowering. Operand order remains significant under native flush-to-zero; this does not rewrite max(value, +0) or a negative-zero left operand.
  • Extend the existing NaN and denormal-mode fixtures with literal-left-zero max cases using their current inputs and unused result slots.

The simplification preserves negative/zero/NaN results, positive finite values, infinity, native denormal comparison behavior and the surrounding IEEE signaling-NaN handling. An earlier focused compilation of the game-emitted fragment produced 1,858 native instructions from 1,911, retaining 32 VGPRs, 128 SGPRs and no spills on RADV. Its assembly matches the private diagnostic prediction; this is a focused compiler result, not exact linked-capture ISA or an elapsed-time estimate.

Tested

Integrated main 98ddd9c1792bbab016ceed5db267a93d1d61f00a into head d67548414c84007e254229861781250f205cbd1a. On both revisions, agc_driver_dx10_clamp, agc_driver_f32_min_max_denormal_modes, agc_driver_f32_min_max_nan, and agc_driver_f32_result_clamp pass with required Vulkan, shader cache disabled and Khronos validation on AMD Radeon 760M, RADV Mesa 25.0.7-2+deb13u1, Debian 13 / Linux 7.2.12-x64v3-xanmod1. Both logs confirm the GPU and layer, with no VUIDs, missing layers or skips. Main uses its own test fixtures. Conventions and whitespace checks pass.

One predeclared warmed pair on the same stationary PPSA28997 camp scene, machine and session compares these exact revisions: 20.92836 → 20.97523 FPS (+0.224%), GPU 44.102 → 43.967 ms/present. One pair does not establish repeatability or a cross-title/vendor result. Both pass the scene, focus, input, library and trace-drop audits; no timed exclusions or extra runs. The PR arm reported two shader-cache misses during startup, before the measurement window; the cache audit found no changes during the window.

Lossless traces, summaries, digests, protocol and provenance were downloaded and hash-verified. The timing-only bundle includes the identical private observer used on both arms, disclosed by dirty flags. The prior three-pair result on f7f03daf and 05842ba remains available in its evidence bundle; it does not measure this integration.

A1

{"commit":"98ddd9c1792b","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2481,"ms":12041.079},"presents":252,"frame_ms":{"p50":47.788,"p90":48.261,"p99":48.598,"max":49.035},"gpu_busy_ms_per_present":44.102,"worker_busy_pct":{"queue worker 0x0":78.878},"top_phases_ms_per_frame":{"Driver.Packet":37.543,"Driver.Packet.draw":34.381,"Driver.Draw":34.317,"Driver.Draw.draw_enqueued":29.803,"Recorder.Sync":28.799,"VideoOut.Flip":9.224,"Driver.Present":9.204,"VideoOut.Flip.present":9.176},"trace_dropped":false,"trace":"aps5-trace-98ddd9c1792b-3315154.json.gz"}

seconds 90:12 from present 2481: 252 presents, frame p50 47.8 / p90 48.3 / p99 48.6 / max 49.0 ms, GPU busy 44.1 ms per present
AMD Radeon 760M (RADV PHOENIX), radv Mesa 25.0.7-2+deb13u1, Linux 7.2.12-x64v3-xanmod1, 1920x1080, commit 98ddd9c179 (dirty), dropped: no

{"commit":"98ddd9c1792b","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2481,"ms":12041.079},"presents":252,"frame_ms":{"p50":47.788,"p90":48.261,"p99":48.598,"max":49.035},"gpu_busy_ms_per_present":44.102,"worker_busy_pct":{"queue worker 0x0":78.878},"top_phases_ms_per_frame":{"Driver.Packet":37.543,"Driver.Packet.draw":34.381,"Driver.Draw":34.317,"Driver.Draw.draw_enqueued":29.803,"Recorder.Sync":28.799,"VideoOut.Flip":9.224,"Driver.Present":9.204,"VideoOut.Flip.present":9.176},"trace_dropped":false,"trace":"aps5-trace-98ddd9c1792b-3315154.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2725: 49.0 ms at 11658 ms: batch (gpu) 44.5, Driver.Packet (queue worker 0x0) 36.5, Driver.Packet.draw (queue worker 0x0) 34.0, Driver.Draw (queue worker 0x0) 33.9
  • present 2657: 48.7 ms at 8404 ms: batch (gpu) 44.7, Driver.Packet (queue worker 0x0) 35.6, Driver.Packet.draw (queue worker 0x0) 33.3, Driver.Draw (queue worker 0x0) 33.1
  • present 2699: 48.6 ms at 10415 ms: batch (gpu) 44.2, Driver.Packet (queue worker 0x0) 36.1, Driver.Packet.draw (queue worker 0x0) 34.2, Driver.Draw (queue worker 0x0) 34.2
  • present 2606: 48.6 ms at 5961 ms: batch (gpu) 44.4, Driver.Packet (queue worker 0x0) 35.9, Driver.Packet.draw (queue worker 0x0) 33.6, Driver.Draw (queue worker 0x0) 33.5
  • present 2527: 48.5 ms at 2199 ms: batch (gpu) 44.0, Driver.Packet (queue worker 0x0) 35.8, Driver.Packet.draw (queue worker 0x0) 33.4, Driver.Draw (queue worker 0x0) 33.3

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 35.6 (74 %) 9.7 (20 %) 2.5 9.9 Driver.Packet 35.4, Driver.EndSubmission 0.1
draw committer 35.0 (73 %) 0.0 (0 %) 12.8 3.4 Recorder.Sync 28.8, Graphics.Draw 4.3
presenter 0.4 (1 %) 8.9 (19 %) 38.5 0.1 VideoOut.Flip 9.2, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 47.7 0.6 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.7 0.4 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.0 Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.8 0.0 Shader.ResolveGraphicsStagesAbi 0.0
gpu 44.1 (92 %) 0.0 (0 %) 3.7 0.0 batch 44.1

Largest slices (ms per frame, inclusive, all threads): batch 44.1, Driver.Packet 35.4, Driver.Packet.draw 33.7, Driver.Draw 33.6, Driver.Draw.draw_enqueued 29.2, Recorder.Sync 28.8, Driver.WorkerWait 9.7, Driver.WorkerWait.idle_and_completion_poll 9.7, VideoOut.Flip 9.2, Driver.Present 9.2

Longest waits

  • Driver.WorkerWait (queue worker 0x0) 10.2 ms at 1768 ms, present 2517
  • Driver.WorkerWait (queue worker 0x0) 10.1 ms at 7733 ms, present 2642
  • Driver.WorkerWait (queue worker 0x0) 10.1 ms at 9841 ms, present 2686
  • Driver.WorkerWait (queue worker 0x0) 10.1 ms at 7350 ms, present 2634
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 9170 ms, present 2672
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 8738 ms, present 2663
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 1433 ms, present 2510
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 8069 ms, present 2649
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 7829 ms, present 2644
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 8834 ms, present 2665

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

  • batch 3055: 14.4 ms at 9719 ms, present 2684: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.2, Graphics.Draw.validate (draw committer) 0.0
  • batch 2965: 14.4 ms at 9431 ms, present 2678: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1, Recorder.Reap (draw committer) 0.0
  • batch 2348: 14.4 ms at 7468 ms, present 2637: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.1
  • batch 3777: 14.4 ms at 12015 ms, present 2732: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0
  • batch 2740: 14.4 ms at 8713 ms, present 2663: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0

B1

{"commit":"d67548414c84","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2474,"ms":12014.169},"presents":252,"frame_ms":{"p50":47.692,"p90":48.222,"p99":48.678,"max":48.788},"gpu_busy_ms_per_present":43.967,"worker_busy_pct":{"queue worker 0x0":78.853},"top_phases_ms_per_frame":{"Driver.Packet":37.448,"Driver.Packet.draw":34.300,"Driver.Draw":34.235,"Driver.Draw.draw_enqueued":30.017,"Recorder.Sync":28.938,"VideoOut.Flip":9.116,"Driver.Present":9.099,"VideoOut.Flip.present":9.071},"trace_dropped":false,"trace":"aps5-trace-d67548414c84-3316556.json.gz"}

seconds 90:12 from present 2474: 252 presents, frame p50 47.7 / p90 48.2 / p99 48.7 / max 48.8 ms, GPU busy 44.0 ms per present
AMD Radeon 760M (RADV PHOENIX), radv Mesa 25.0.7-2+deb13u1, Linux 7.2.12-x64v3-xanmod1, 1920x1080, commit d67548414c (dirty), dropped: no

{"commit":"d67548414c84","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2474,"ms":12014.169},"presents":252,"frame_ms":{"p50":47.692,"p90":48.222,"p99":48.678,"max":48.788},"gpu_busy_ms_per_present":43.967,"worker_busy_pct":{"queue worker 0x0":78.853},"top_phases_ms_per_frame":{"Driver.Packet":37.448,"Driver.Packet.draw":34.3,"Driver.Draw":34.235,"Driver.Draw.draw_enqueued":30.017,"Recorder.Sync":28.938,"VideoOut.Flip":9.116,"Driver.Present":9.099,"VideoOut.Flip.present":9.071},"trace_dropped":false,"trace":"aps5-trace-d67548414c84-3316556.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2507: 48.8 ms at 1580 ms: batch (gpu) 44.3, Driver.Packet (queue worker 0x0) 35.8, Driver.Packet.draw (queue worker 0x0) 33.8, Driver.Draw (queue worker 0x0) 33.7
  • present 2547: 48.7 ms at 3497 ms: batch (gpu) 44.4, Driver.Packet (queue worker 0x0) 36.0, Driver.Packet.draw (queue worker 0x0) 34.1, Driver.Draw (queue worker 0x0) 34.0
  • present 2706: 48.7 ms at 11059 ms: batch (gpu) 43.8, Driver.Packet (queue worker 0x0) 36.5, Driver.Packet.draw (queue worker 0x0) 34.1, Driver.Draw (queue worker 0x0) 34.0
  • present 2559: 48.5 ms at 4070 ms: batch (gpu) 44.6, Driver.Packet (queue worker 0x0) 36.0, Driver.Packet.draw (queue worker 0x0) 33.8, Driver.Draw (queue worker 0x0) 33.8
  • present 2529: 48.5 ms at 2634 ms: batch (gpu) 44.4, Driver.Packet (queue worker 0x0) 36.1, Driver.Packet.draw (queue worker 0x0) 34.1, Driver.Draw (queue worker 0x0) 34.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 35.4 (74 %) 9.7 (20 %) 2.6 9.8 Driver.Packet 35.3, Driver.EndSubmission 0.1
draw committer 35.1 (74 %) 0.0 (0 %) 12.6 3.4 Recorder.Sync 28.9, Graphics.Draw 4.2
presenter 0.4 (1 %) 8.8 (18 %) 38.5 0.1 VideoOut.Flip 9.1, Driver.Present 0.0
title 0.1 (0 %) 0.0 (0 %) 47.6 0.6 Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.6 0.1 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.6 0.5 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.7 0.0 Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0
title 0.0 (0 %) 0.0 (0 %) 47.7 0.0 Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0
gpu 43.9 (92 %) 0.0 (0 %) 3.7 0.0 batch 43.9

Largest slices (ms per frame, inclusive, all threads): batch 43.9, Driver.Packet 35.3, Driver.Packet.draw 33.6, Driver.Draw 33.5, Driver.Draw.draw_enqueued 29.4, Recorder.Sync 28.9, Driver.WorkerWait 9.7, Driver.WorkerWait.idle_and_completion_poll 9.7, VideoOut.Flip 9.1, Driver.Present 9.1

Longest waits

  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 11442 ms, present 2713
  • Driver.WorkerWait (queue worker 0x0) 10.0 ms at 1340 ms, present 2501
  • Driver.WorkerWait (queue worker 0x0) 9.9 ms at 5604 ms, present 2590
  • Driver.WorkerWait (queue worker 0x0) 9.9 ms at 1580 ms, present 2506
  • Driver.WorkerWait (queue worker 0x0) 9.9 ms at 7652 ms, present 2633
  • Driver.WorkerWait (queue worker 0x0) 9.8 ms at 8414 ms, present 2649
  • Driver.WorkerWait (queue worker 0x0) 9.7 ms at 7891 ms, present 2638
  • Driver.WorkerWait (queue worker 0x0) 9.7 ms at 2203 ms, present 2519
  • Driver.WorkerWait (queue worker 0x0) 9.7 ms at 2968 ms, present 2535
  • Driver.WorkerWait (queue worker 0x0) 9.7 ms at 5030 ms, present 2578

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

  • batch 785: 14.3 ms at 2513 ms, present 2526: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.2
  • batch 3687: 14.3 ms at 11703 ms, present 2719: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0
  • batch 215: 14.3 ms at 695 ms, present 2488: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1
  • batch 3417: 14.3 ms at 10843 ms, present 2701: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.2
  • batch 109: 14.3 ms at 358 ms, present 2481: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.2

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: AMD Radeon760M (vendor AMD), RADV Mesa25.0.7-2+deb13u1, Debian13 / Linux7.2.12-x64v3-xanmod1; historical peer compositions below
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5046907656 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12287). Originally posted by [Filip722](https://github.com/Filip722) on 2026-10-28T07:35:43Z. --- ### What `max(+0, value)` currently uses the general f32 min/max lowering, including NaN classification, a signed-zero check and multiple selects. The camp scene executes this sequence repeatedly in a costly fragment shader. - For a literal positive-zero left operand, emit one ordered `value > +0` comparison and select `value` or `+0`. - Keep all other min/max cases on the existing lowering. Operand order remains significant under native flush-to-zero; this does not rewrite `max(value, +0)` or a negative-zero left operand. - Extend the existing NaN and denormal-mode fixtures with literal-left-zero max cases using their current inputs and unused result slots. The simplification preserves negative/zero/NaN results, positive finite values, infinity, native denormal comparison behavior and the surrounding IEEE signaling-NaN handling. An earlier focused compilation of the game-emitted fragment produced **1,858 native instructions from 1,911**, retaining 32 VGPRs, 128 SGPRs and no spills on RADV. Its assembly matches the private diagnostic prediction; this is a focused compiler result, not exact linked-capture ISA or an elapsed-time estimate. ### Tested Integrated main `98ddd9c1792bbab016ceed5db267a93d1d61f00a` into head `d67548414c84007e254229861781250f205cbd1a`. On both revisions, `agc_driver_dx10_clamp`, `agc_driver_f32_min_max_denormal_modes`, `agc_driver_f32_min_max_nan`, and `agc_driver_f32_result_clamp` pass with required Vulkan, shader cache disabled and Khronos validation on AMD Radeon 760M, RADV Mesa 25.0.7-2+deb13u1, Debian 13 / Linux 7.2.12-x64v3-xanmod1. Both logs confirm the GPU and layer, with no VUIDs, missing layers or skips. Main uses its own test fixtures. Conventions and whitespace checks pass. One predeclared warmed pair on the same stationary PPSA28997 camp scene, machine and session compares these exact revisions: **20.92836 → 20.97523 FPS (+0.224%)**, GPU **44.102 → 43.967 ms/present**. One pair does not establish repeatability or a cross-title/vendor result. Both pass the scene, focus, input, library and trace-drop audits; no timed exclusions or extra runs. The PR arm reported two shader-cache misses during startup, before the measurement window; the cache audit found no changes during the window. [Lossless traces, summaries, digests, protocol and provenance](https://gist.github.com/Filip722/e33645bd7d0b357849970d749599149a) were downloaded and hash-verified. The timing-only bundle includes the identical private observer used on both arms, disclosed by dirty flags. The prior three-pair result on `f7f03daf` and `05842ba` remains available in its [evidence bundle](https://gist.github.com/Filip722/07c1c6fe5ab7be0f747c846814baba1b); it does not measure this integration. #### A1 ```json {"commit":"98ddd9c1792b","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2481,"ms":12041.079},"presents":252,"frame_ms":{"p50":47.788,"p90":48.261,"p99":48.598,"max":49.035},"gpu_busy_ms_per_present":44.102,"worker_busy_pct":{"queue worker 0x0":78.878},"top_phases_ms_per_frame":{"Driver.Packet":37.543,"Driver.Packet.draw":34.381,"Driver.Draw":34.317,"Driver.Draw.draw_enqueued":29.803,"Recorder.Sync":28.799,"VideoOut.Flip":9.224,"Driver.Present":9.204,"VideoOut.Flip.present":9.176},"trace_dropped":false,"trace":"aps5-trace-98ddd9c1792b-3315154.json.gz"} ``` **seconds 90:12** from present 2481: 252 presents, frame p50 47.8 / p90 48.3 / p99 48.6 / max 49.0 ms, GPU busy 44.1 ms per present AMD Radeon 760M (RADV PHOENIX), radv Mesa 25.0.7-2+deb13u1, Linux 7.2.12-x64v3-xanmod1, 1920x1080, commit 98ddd9c1792b (dirty), dropped: no ```json {"commit":"98ddd9c1792b","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2481,"ms":12041.079},"presents":252,"frame_ms":{"p50":47.788,"p90":48.261,"p99":48.598,"max":49.035},"gpu_busy_ms_per_present":44.102,"worker_busy_pct":{"queue worker 0x0":78.878},"top_phases_ms_per_frame":{"Driver.Packet":37.543,"Driver.Packet.draw":34.381,"Driver.Draw":34.317,"Driver.Draw.draw_enqueued":29.803,"Recorder.Sync":28.799,"VideoOut.Flip":9.224,"Driver.Present":9.204,"VideoOut.Flip.present":9.176},"trace_dropped":false,"trace":"aps5-trace-98ddd9c1792b-3315154.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2725: 49.0 ms at 11658 ms: batch (gpu) 44.5, Driver.Packet (queue worker 0x0) 36.5, Driver.Packet.draw (queue worker 0x0) 34.0, Driver.Draw (queue worker 0x0) 33.9 - present 2657: 48.7 ms at 8404 ms: batch (gpu) 44.7, Driver.Packet (queue worker 0x0) 35.6, Driver.Packet.draw (queue worker 0x0) 33.3, Driver.Draw (queue worker 0x0) 33.1 - present 2699: 48.6 ms at 10415 ms: batch (gpu) 44.2, Driver.Packet (queue worker 0x0) 36.1, Driver.Packet.draw (queue worker 0x0) 34.2, Driver.Draw (queue worker 0x0) 34.2 - present 2606: 48.6 ms at 5961 ms: batch (gpu) 44.4, Driver.Packet (queue worker 0x0) 35.9, Driver.Packet.draw (queue worker 0x0) 33.6, Driver.Draw (queue worker 0x0) 33.5 - present 2527: 48.5 ms at 2199 ms: batch (gpu) 44.0, Driver.Packet (queue worker 0x0) 35.8, Driver.Packet.draw (queue worker 0x0) 33.4, Driver.Draw (queue worker 0x0) 33.3 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 35.6 (74 %) | 9.7 (20 %) | 2.5 | 9.9 | Driver.Packet 35.4, Driver.EndSubmission 0.1 | | draw committer | 35.0 (73 %) | 0.0 (0 %) | 12.8 | 3.4 | Recorder.Sync 28.8, Graphics.Draw 4.3 | | presenter | 0.4 (1 %) | 8.9 (19 %) | 38.5 | 0.1 | VideoOut.Flip 9.2, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 47.7 | 0.6 | Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.7 | 0.4 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.8 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0 | | gpu | 44.1 (92 %) | 0.0 (0 %) | 3.7 | 0.0 | batch 44.1 | **Largest slices** (ms per frame, inclusive, all threads): batch 44.1, Driver.Packet 35.4, Driver.Packet.draw 33.7, Driver.Draw 33.6, Driver.Draw.draw_enqueued 29.2, Recorder.Sync 28.8, Driver.WorkerWait 9.7, Driver.WorkerWait.idle_and_completion_poll 9.7, VideoOut.Flip 9.2, Driver.Present 9.2 **Longest waits** - Driver.WorkerWait (queue worker 0x0) 10.2 ms at 1768 ms, present 2517 - Driver.WorkerWait (queue worker 0x0) 10.1 ms at 7733 ms, present 2642 - Driver.WorkerWait (queue worker 0x0) 10.1 ms at 9841 ms, present 2686 - Driver.WorkerWait (queue worker 0x0) 10.1 ms at 7350 ms, present 2634 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 9170 ms, present 2672 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 8738 ms, present 2663 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 1433 ms, present 2510 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 8069 ms, present 2649 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 7829 ms, present 2644 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 8834 ms, present 2665 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 3055: 14.4 ms at 9719 ms, present 2684: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.2, Graphics.Draw.validate (draw committer) 0.0 - batch 2965: 14.4 ms at 9431 ms, present 2678: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1, Recorder.Reap (draw committer) 0.0 - batch 2348: 14.4 ms at 7468 ms, present 2637: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.5, Recorder.Submit (draw committer) 0.1 - batch 3777: 14.4 ms at 12015 ms, present 2732: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0 - batch 2740: 14.4 ms at 8713 ms, present 2663: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.6, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0 #### B1 ```json {"commit":"d67548414c84","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2474,"ms":12014.169},"presents":252,"frame_ms":{"p50":47.692,"p90":48.222,"p99":48.678,"max":48.788},"gpu_busy_ms_per_present":43.967,"worker_busy_pct":{"queue worker 0x0":78.853},"top_phases_ms_per_frame":{"Driver.Packet":37.448,"Driver.Packet.draw":34.300,"Driver.Draw":34.235,"Driver.Draw.draw_enqueued":30.017,"Recorder.Sync":28.938,"VideoOut.Flip":9.116,"Driver.Present":9.099,"VideoOut.Flip.present":9.071},"trace_dropped":false,"trace":"aps5-trace-d67548414c84-3316556.json.gz"} ``` **seconds 90:12** from present 2474: 252 presents, frame p50 47.7 / p90 48.2 / p99 48.7 / max 48.8 ms, GPU busy 44.0 ms per present AMD Radeon 760M (RADV PHOENIX), radv Mesa 25.0.7-2+deb13u1, Linux 7.2.12-x64v3-xanmod1, 1920x1080, commit d67548414c84 (dirty), dropped: no ```json {"commit":"d67548414c84","dirty":true,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:12"},"gpu":"AMD Radeon 760M (RADV PHOENIX)","driver":"radv Mesa 25.0.7-2+deb13u1","os":"Linux 7.2.12-x64v3-xanmod1","cpu":"AMD Ryzen 5 7640HS w/ Radeon 760M Graphics","cpu_threads":12,"memory_mib":23820,"title_id":"PPSA28997","title":"God of War Sons of Sparta","content_version":"01.008.001","resolution":"1920x1080","window":{"spec":"seconds 90:12","first_present":2474,"ms":12014.169},"presents":252,"frame_ms":{"p50":47.692,"p90":48.222,"p99":48.678,"max":48.788},"gpu_busy_ms_per_present":43.967,"worker_busy_pct":{"queue worker 0x0":78.853},"top_phases_ms_per_frame":{"Driver.Packet":37.448,"Driver.Packet.draw":34.3,"Driver.Draw":34.235,"Driver.Draw.draw_enqueued":30.017,"Recorder.Sync":28.938,"VideoOut.Flip":9.116,"Driver.Present":9.099,"VideoOut.Flip.present":9.071},"trace_dropped":false,"trace":"aps5-trace-d67548414c84-3316556.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 2507: 48.8 ms at 1580 ms: batch (gpu) 44.3, Driver.Packet (queue worker 0x0) 35.8, Driver.Packet.draw (queue worker 0x0) 33.8, Driver.Draw (queue worker 0x0) 33.7 - present 2547: 48.7 ms at 3497 ms: batch (gpu) 44.4, Driver.Packet (queue worker 0x0) 36.0, Driver.Packet.draw (queue worker 0x0) 34.1, Driver.Draw (queue worker 0x0) 34.0 - present 2706: 48.7 ms at 11059 ms: batch (gpu) 43.8, Driver.Packet (queue worker 0x0) 36.5, Driver.Packet.draw (queue worker 0x0) 34.1, Driver.Draw (queue worker 0x0) 34.0 - present 2559: 48.5 ms at 4070 ms: batch (gpu) 44.6, Driver.Packet (queue worker 0x0) 36.0, Driver.Packet.draw (queue worker 0x0) 33.8, Driver.Draw (queue worker 0x0) 33.8 - present 2529: 48.5 ms at 2634 ms: batch (gpu) 44.4, Driver.Packet (queue worker 0x0) 36.1, Driver.Packet.draw (queue worker 0x0) 34.1, Driver.Draw (queue worker 0x0) 34.1 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | queue worker 0x0 | 35.4 (74 %) | 9.7 (20 %) | 2.6 | 9.8 | Driver.Packet 35.3, Driver.EndSubmission 0.1 | | draw committer | 35.1 (74 %) | 0.0 (0 %) | 12.6 | 3.4 | Recorder.Sync 28.9, Graphics.Draw 4.2 | | presenter | 0.4 (1 %) | 8.8 (18 %) | 38.5 | 0.1 | VideoOut.Flip 9.1, Driver.Present 0.0 | | title | 0.1 (0 %) | 0.0 (0 %) | 47.6 | 0.6 | Shader.ResolveGraphicsStagesAbi 0.1, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.6 | 0.1 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.6 | 0.5 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveGraphicsAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.7 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.7 | 0.0 | Shader.ResolveAbi 0.0, Shader.ResolveGraphicsStagesAbi 0.0 | | title | 0.0 (0 %) | 0.0 (0 %) | 47.7 | 0.0 | Shader.ResolveGraphicsStagesAbi 0.0, Shader.ResolveAbi 0.0 | | gpu | 43.9 (92 %) | 0.0 (0 %) | 3.7 | 0.0 | batch 43.9 | **Largest slices** (ms per frame, inclusive, all threads): batch 43.9, Driver.Packet 35.3, Driver.Packet.draw 33.6, Driver.Draw 33.5, Driver.Draw.draw_enqueued 29.4, Recorder.Sync 28.9, Driver.WorkerWait 9.7, Driver.WorkerWait.idle_and_completion_poll 9.7, VideoOut.Flip 9.1, Driver.Present 9.1 **Longest waits** - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 11442 ms, present 2713 - Driver.WorkerWait (queue worker 0x0) 10.0 ms at 1340 ms, present 2501 - Driver.WorkerWait (queue worker 0x0) 9.9 ms at 5604 ms, present 2590 - Driver.WorkerWait (queue worker 0x0) 9.9 ms at 1580 ms, present 2506 - Driver.WorkerWait (queue worker 0x0) 9.9 ms at 7652 ms, present 2633 - Driver.WorkerWait (queue worker 0x0) 9.8 ms at 8414 ms, present 2649 - Driver.WorkerWait (queue worker 0x0) 9.7 ms at 7891 ms, present 2638 - Driver.WorkerWait (queue worker 0x0) 9.7 ms at 2203 ms, present 2519 - Driver.WorkerWait (queue worker 0x0) 9.7 ms at 2968 ms, present 2535 - Driver.WorkerWait (queue worker 0x0) 9.7 ms at 5030 ms, present 2578 **Largest GPU batches** (GPU ranges inside, and the CPU slices that recorded each, inclusive) - batch 785: 14.3 ms at 2513 ms, present 2526: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.9, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.2 - batch 3687: 14.3 ms at 11703 ms, present 2719: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.1, Graphics.Draw.validate (draw committer) 0.0 - batch 215: 14.3 ms at 695 ms, present 2488: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.8, Graphics.Draw.draw_and_resource_release (draw committer) 0.4, Recorder.Submit (draw committer) 0.1 - batch 3417: 14.3 ms at 10843 ms, present 2701: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.7, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.2 - batch 109: 14.3 ms at 358 ms, present 2481: GPU no ranges; recorded by Graphics.Draw (draw committer) 0.6, Graphics.Draw.draw_and_resource_release (draw committer) 0.3, Recorder.Submit (draw committer) 0.2 ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> AMD Radeon760M (vendor AMD), RADV Mesa25.0.7-2+deb13u1, Debian13 / Linux7.2.12-x64v3-xanmod1; historical peer compositions below - [x] AI-assisted: <!-- yes / no --> yes (Codex)
MarcZX10 commented 2026-10-28 08:51:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T08:51:47Z.

Review: CHANGES_REQUESTED


The focused min/max coverage and paired scene measurements are detailed, but the required comparison is against a stale base: the report pins main at d5140548fc79 and says it later advanced to b99bbebacd; current main is now 87b810a1db14. Since this is a shader-recompiler change, the repository requires the same focused validation tests on main and the change. Please update the branch to current main, rerun the focused min/max tests on that base and head with the prescribed validation settings, and refresh the performance pair if the updated production source changes the tested code path. Until then I cannot treat the old baseline as a current-main review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5680001350 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12287#pullrequestreview-5680001350). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T08:51:47Z. **Review:** CHANGES_REQUESTED --- The focused min/max coverage and paired scene measurements are detailed, but the required comparison is against a stale base: the report pins `main` at `d5140548fc79` and says it later advanced to `b99bbebacd`; current `main` is now `87b810a1db14`. Since this is a shader-recompiler change, the repository requires the same focused validation tests on `main` and the change. Please update the branch to current `main`, rerun the focused min/max tests on that base and head with the prescribed validation settings, and refresh the performance pair if the updated production source changes the tested code path. Until then I cannot treat the old baseline as a current-main review.
imellag commented 2026-10-28 18:45:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by imellag on 2026-10-28T18:45:00Z.

Review: APPROVED


macOS / MoltenVK data point. Apple M4 Pro, macOS 27.2, MoltenVK 1.4.2, x86_64 Release under Rosetta. main doesn't run titles on macOS yet, so the base is a support branch, not main: main 750cf6cf48 + only the macOS boot PRs #7631 #10552 #11249 #11447 #11554 #10669 #7804, + #12529 (the revert of #10337, which roughly doubles the GPU time on this GPU and would hide smaller changes). Change: that base + eight open shader performance PRs merged together (#12287 #11952 #12299 #12280 #11368 #11265 #8716 #8958, all clean merges). I did not measure each PR alone.

Two alternated runs per side, warm shader cache, APS5_TRACE_SUMMARY_EVERY=10:

base with the eight PRs
God of War Sons of Sparta (PPSA28997), fps from 30 s 51.5 / 51.8 51.6 / 51.8
GoW GPU ms/present, gameplay before the fight / in the fight 13.6 / 19.6 13.5 / 19.5
Planet of Lana (PPSA19450), fps from 85 s 32.2 / 32.7 32.5 / 32.6

Together they don't raise the GPU time on MoltenVK. I'm checking open shader performance PRs on this GPU because #10337 was measured on RADV and doubled it here.

Focused tests below ran with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on the same two trees; the layer was found and both logs have the same VUID- lines (12 VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605, 20 VUID-vkCreateDescriptorSetLayout-support-09582, from tests that fail the same way on the base).

This PR on MoltenVK: agc_driver_dx10_clamp, agc_driver_f32_min_max_denormal_modes, agc_driver_f32_min_max_nan and agc_driver_f32_result_clamp pass on the base and with the change, so the new literal-zero rows also hold on Apple's GPU. The fast path is one ordered compare and a select in place of the classify-and-select lowering, which is cheaper on any backend; I see no case where it changes the result. Approving from the macOS side.

AI-assisted: yes (Claude Code ran the builds, runs and tests and drafted this review)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5687924628 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12287#pullrequestreview-5687924628). Originally posted by [imellag](https://github.com/imellag) on 2026-10-28T18:45:00Z. **Review:** APPROVED --- **macOS / MoltenVK data point.** Apple M4 Pro, macOS 27.2, MoltenVK 1.4.2, x86_64 Release under Rosetta. `main` doesn't run titles on macOS yet, so the base is a support branch, not `main`: `main` `750cf6cf48` + only the macOS boot PRs #7631 #10552 #11249 #11447 #11554 #10669 #7804, + #12529 (the revert of #10337, which roughly doubles the GPU time on this GPU and would hide smaller changes). Change: that base + eight open shader performance PRs merged together (#12287 #11952 #12299 #12280 #11368 #11265 #8716 #8958, all clean merges). I did not measure each PR alone. Two alternated runs per side, warm shader cache, `APS5_TRACE_SUMMARY_EVERY=10`: | | base | with the eight PRs | |---|---|---| | God of War Sons of Sparta (PPSA28997), fps from 30 s | 51.5 / 51.8 | 51.6 / 51.8 | | GoW GPU ms/present, gameplay before the fight / in the fight | 13.6 / 19.6 | 13.5 / 19.5 | | Planet of Lana (PPSA19450), fps from 85 s | 32.2 / 32.7 | 32.5 / 32.6 | Together they don't raise the GPU time on MoltenVK. I'm checking open shader performance PRs on this GPU because #10337 was measured on RADV and doubled it here. Focused tests below ran with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on the same two trees; the layer was found and both logs have the same `VUID-` lines (12 `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605`, 20 `VUID-vkCreateDescriptorSetLayout-support-09582`, from tests that fail the same way on the base). **This PR on MoltenVK:** `agc_driver_dx10_clamp`, `agc_driver_f32_min_max_denormal_modes`, `agc_driver_f32_min_max_nan` and `agc_driver_f32_result_clamp` pass on the base and with the change, so the new literal-zero rows also hold on Apple's GPU. The fast path is one ordered compare and a select in place of the classify-and-select lowering, which is cheaper on any backend; I see no case where it changes the result. Approving from the macOS side. AI-assisted: yes (Claude Code ran the builds, runs and tests and drafted this review)
MarcZX10 commented 2026-10-29 06:16:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T06:16:52Z.

Review: APPROVED


Re-checked — approved

The exact head 67d3a64e80321e65f5478b8573570ba58b5e6273 has the requested current-main comparison. The author reports the four focused min/max, denormal, and clamp fixtures passing on both sides, with zero VUIDs or skips; a Windows/NVIDIA repeat also passed 4/4 on both sides in three runs. The tested SpirvModuleEmitter.cpp is byte-identical between the measured base and refreshed main, and the PR includes matched scene/machine performance summaries and trace digests.

The current-main merge preview is clean and the changed paths have no additional main-side edits since the tested refresh. Hosted policy and Windows jobs pass; Linux product CI is skipped. I did not run GPU tests locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693622265 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12287#pullrequestreview-5693622265). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T06:16:52Z. **Review:** APPROVED --- ## Re-checked — approved The exact head `67d3a64e80321e65f5478b8573570ba58b5e6273` has the requested current-main comparison. The author reports the four focused min/max, denormal, and clamp fixtures passing on both sides, with zero VUIDs or skips; a Windows/NVIDIA repeat also passed 4/4 on both sides in three runs. The tested `SpirvModuleEmitter.cpp` is byte-identical between the measured base and refreshed main, and the PR includes matched scene/machine performance summaries and trace digests. The current-main merge preview is clean and the changed paths have no additional main-side edits since the tested refresh. Hosted policy and Windows jobs pass; Linux product CI is skipped. I did not run GPU tests locally.
MarcZX10 commented 2026-10-29 08:36:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:36:14Z.

Review: CHANGES_REQUESTED


Re-reviewed exact head 1b2135eb827012c3008dd8b57337d554d5c7cb24. The current-main focused validation report is useful, but the performance refresh is explicitly pending and the old captures are not a compliant report for this integration. The perf label check also confirms the required same-title, same-scene, same-machine main/change aps5-summary.jsonl lines, attached traces, and tools/trace_digest.py output are absent. Please add that report before approval. I did not run GPU tests locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694875729 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12287#pullrequestreview-5694875729). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T08:36:14Z. **Review:** CHANGES_REQUESTED --- Re-reviewed exact head `1b2135eb827012c3008dd8b57337d554d5c7cb24`. The current-main focused validation report is useful, but the performance refresh is explicitly pending and the old captures are not a compliant report for this integration. The `perf` label check also confirms the required same-title, same-scene, same-machine `main`/change `aps5-summary.jsonl` lines, attached traces, and `tools/trace_digest.py` output are absent. Please add that report before approval. I did not run GPU tests locally.
MarcZX10 commented 2026-10-30 01:06:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T01:06:34Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The new report resolves the missing-evidence point on its pinned revisions, but current main has since added shader-recompiler handling for FPMax32, so the report does not validate this change against today’s implementation.

What I ran

  • Exact PR head: 0821cd0771c89a2352cc9602c891a919610cbc6b; PR base and report baseline: fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42; current main: f6fddd60d826831f70f7c62e25423610ee742bcc.
  • Environment: Linux x86_64, Git 2.39.5, Python 3.11.2. No project build, CTest, or GPU test was run locally.
  • The current-main merge preview is clean. git diff --check and conventions pass.
  • Since the report baseline, SpirvAluEmitterMath.cpp changed on main; the new matcher explicitly handles IrOpcode::FPMax32. This PR changes EmitMinMaxF32Value for FPMax, so the new path is relevant to the operation under review.
git merge-tree --write-tree upstream/main 0821cd0771c89a2352cc9602c891a919610cbc6b
git diff --check upstream/main 0821cd0771c89a2352cc9602c891a919610cbc6b
python3 tools/check_conventions.py --base upstream/main --head 0821cd0771c89a2352cc9602c891a919610cbc6b
git diff --stat fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42 upstream/main -- core/shader/recompiler/SpirvBackend/src/SpirvAlu/SpirvAluEmitterMath.cpp

Results

Check Result
Current-main merge preview Clean; tree 214eccae3fb96f5bcd2321ee533636420b080a51
git diff --check Passed; no output
Conventions Passed
Current-main source delta since report baseline SpirvAluEmitterMath.cpp adds 276 lines and removes 3; it introduces FPMax32 wave-reduction matching
Author-reported focused comparison Four selected tests pass on both fd9b3f62d43d and the PR head, with zero VUIDs, missing-layer warnings or skips; this report predates the current-main FPMax32 change
Author-reported performance pair Three matched pairs on the same older main/head revisions; mixed FPS direction, with no claim of a consistent gain. The updated comparison does not measure current main
Hosted checks on exact PR head Windows, conventions, labels, eligibility, report, relinker matrix and ASan pass; Linux product and specialized jobs were skipped
Unedited local command output
$ git merge-tree --write-tree upstream/main 0821cd0771c89a2352cc9602c891a919610cbc6b
214eccae3fb96f5bcd2321ee533636420b080a51
$ python3 tools/check_conventions.py --base upstream/main --head 0821cd0771c89a2352cc9602c891a919610cbc6b
All conventions checks passed.
$ git diff --stat fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42 upstream/main -- core/shader/recompiler/SpirvBackend/src/SpirvAlu/SpirvAluEmitterMath.cpp
 .../src/SpirvAlu/SpirvAluEmitterMath.cpp           | 279 ++++++++++++++++++++-
 1 file changed, 276 insertions(+), 3 deletions(-)

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

Findings

Blocking

  • Please run the same four focused min/max tests on current main and the updated PR head with the prescribed Khronos validation settings. The new FPMax32 reduction matcher postdates the report baseline and may affect compilation or execution involving this opcode; the existing report does not exercise the combined current-main tree.
  • Refresh the matched perf report against current main and the updated PR head on the same title, scene, machine and settings. The existing samples remain useful for their pinned revisions, but do not measure the present integration after the intervening FPMax32 change.

Non-blocking

The current branch merges cleanly, and the author’s report is internally described as mixed FPS evidence rather than a repeatable frame-rate claim.

Sources

Not verified

I did not build or run the focused tests, validation layers, or performance captures locally. Those results are author-reported. Linux product and specialized hosted jobs were skipped.

To get this to a good state

Integrate current main, publish the focused validation comparison and a matched current-main performance pair, then request re-review. I will rerun the same non-build checks on the resulting head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5706925557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12287#pullrequestreview-5706925557). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T01:06:34Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The new report resolves the missing-evidence point on its pinned revisions, but current `main` has since added shader-recompiler handling for `FPMax32`, so the report does not validate this change against today’s implementation. ## What I ran - Exact PR head: `0821cd0771c89a2352cc9602c891a919610cbc6b`; PR base and report baseline: `fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42`; current `main`: `f6fddd60d826831f70f7c62e25423610ee742bcc`. - Environment: Linux x86_64, Git 2.39.5, Python 3.11.2. No project build, CTest, or GPU test was run locally. - The current-main merge preview is clean. `git diff --check` and conventions pass. - Since the report baseline, `SpirvAluEmitterMath.cpp` changed on `main`; the new matcher explicitly handles `IrOpcode::FPMax32`. This PR changes `EmitMinMaxF32Value` for FPMax, so the new path is relevant to the operation under review. ```sh git merge-tree --write-tree upstream/main 0821cd0771c89a2352cc9602c891a919610cbc6b git diff --check upstream/main 0821cd0771c89a2352cc9602c891a919610cbc6b python3 tools/check_conventions.py --base upstream/main --head 0821cd0771c89a2352cc9602c891a919610cbc6b git diff --stat fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42 upstream/main -- core/shader/recompiler/SpirvBackend/src/SpirvAlu/SpirvAluEmitterMath.cpp ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Clean; tree `214eccae3fb96f5bcd2321ee533636420b080a51` | | `git diff --check` | Passed; no output | | Conventions | Passed | | Current-main source delta since report baseline | `SpirvAluEmitterMath.cpp` adds 276 lines and removes 3; it introduces FPMax32 wave-reduction matching | | Author-reported focused comparison | Four selected tests pass on both `fd9b3f62d43d` and the PR head, with zero VUIDs, missing-layer warnings or skips; this report predates the current-main `FPMax32` change | | Author-reported performance pair | Three matched pairs on the same older main/head revisions; mixed FPS direction, with no claim of a consistent gain. The updated comparison does not measure current `main` | | Hosted checks on exact PR head | Windows, conventions, labels, eligibility, report, relinker matrix and ASan pass; Linux product and specialized jobs were skipped | <details> <summary>Unedited local command output</summary> ```text $ git merge-tree --write-tree upstream/main 0821cd0771c89a2352cc9602c891a919610cbc6b 214eccae3fb96f5bcd2321ee533636420b080a51 $ python3 tools/check_conventions.py --base upstream/main --head 0821cd0771c89a2352cc9602c891a919610cbc6b All conventions checks passed. $ git diff --stat fd9b3f62d43d6753d28a31a7c285e1f51e9c1b42 upstream/main -- core/shader/recompiler/SpirvBackend/src/SpirvAlu/SpirvAluEmitterMath.cpp .../src/SpirvAlu/SpirvAluEmitterMath.cpp | 279 ++++++++++++++++++++- 1 file changed, 276 insertions(+), 3 deletions(-) ``` `git diff --check` produced no output and exited 0. </details> ## Findings ### Blocking - Please run the same four focused min/max tests on current `main` and the updated PR head with the prescribed Khronos validation settings. The new `FPMax32` reduction matcher postdates the report baseline and may affect compilation or execution involving this opcode; the existing report does not exercise the combined current-main tree. - Refresh the matched `perf` report against current `main` and the updated PR head on the same title, scene, machine and settings. The existing samples remain useful for their pinned revisions, but do not measure the present integration after the intervening `FPMax32` change. ### Non-blocking The current branch merges cleanly, and the author’s report is internally described as mixed FPS evidence rather than a repeatable frame-rate claim. ## Sources - [Current-main `FPMax32` reduction handling](https://github.com/boykopovar/AnyPS5/blob/f6fddd60d826831f70f7c62e25423610ee742bcc/core/shader/recompiler/SpirvBackend/src/SpirvAlu/SpirvAluEmitterMath.cpp) - [PR’s `FPMax32` lowering change](https://github.com/boykopovar/AnyPS5/blob/0821cd0771c89a2352cc9602c891a919610cbc6b/core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp) - [Author’s requested re-review and pinned results](https://github.com/boykopovar/AnyPS5/pull/12287#issuecomment-6507743174) ## Not verified I did not build or run the focused tests, validation layers, or performance captures locally. Those results are author-reported. Linux product and specialized hosted jobs were skipped. ## To get this to a good state Integrate current `main`, publish the focused validation comparison and a matched current-main performance pair, then request re-review. I will rerun the same non-build checks on the resulting head.
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!12287
No description provided.