perf(shader): keep the device's f32 NaN result behind an operand guard when a startup probe matches #20187

Closed
Ketz7 wants to merge 1 commit from upstream-pr/20187 into main
Ketz7 commented 2026-11-14 19:52:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ketz7 on 2026-11-14T19:52:51Z.


What

  • Outside IEEE_MODE, the emitter rebuilds RDNA's NaN result for every v_add_f32, v_sub_f32, v_subrev_f32 and v_mul_f32 (nanResultF32 / propagatedNanResultF32). That sequence dominates the SPIR-V of large compute programs and the time the driver spends compiling them, which is what trips the title watchdogs in #6118 and #12089 (see also #11183). #17227 already drops the selects whose payload nothing observes; this change covers the ones that remain.
  • On the RX 7900 XT the device already returns RDNA's NaN whenever only one operand is a NaN; it differs only when both are different NaNs. The new path puts an operand guard in front of the native instruction instead: when the operand RDNA would return is a NaN, the other operand becomes 0, so the hardware only ever sees one NaN. v_mul_f32 keeps its tiny-product flush.
  • A startup probe (ProbeFloat32SingleNans, Execution/src/Float32NanProbe.cpp), in the style of FloatFlushProbe, runs the four instructions over every ordered pair of four buffer-loaded registers. It covers 32 lanes and 8 rounds of quiet and signalling NaNs with different payloads and signs, infinities, zeros, normals and denormals, with no float mode and with denormals flushed. It compiles each mode once with the emulated NaN and once with the guard, and compares 24,576 results bit for bit. It takes about 10 ms.
  • SpirvTarget::float32SingleNans is set only when every result matches. It is part of the cache key and of the serialized request (version 58; older requests read as false).
  • The guard applies only when f32 rounds to nearest even, the only mode the probe checks. APS5_FAST_F32, IEEE_MODE, a directed f32 rounding mode and the fused forms keep their current paths. APS5_NO_NATIVE_F32_NANS skips the probe.
  • agc_shader_replay --f32-single-nans replays a request with the flag.
  • New GPU test tests/execution/Float32NanProbe.cpp. It checks that the guarded module is smaller than the emulated one, that IEEE_MODE output is unchanged by the flag, that the probe compares all 24,576 results, and that a device with the flag set reports no mismatch.
  • RequestSerializerTests covers version 58: round trip, truncation, a version 57 request and the future-version check.
  • Docs: ARCHITECTURE.md section, ENVIRONMENT.md row, and a debt entry in docs/dev/debt/libSceAgcDriver.md. The debt entry records what the probe cannot see: a different compiler choice on larger programs, other stages and wave64.

Tested

  • Windows 11 Pro 26H2 (build 26300.9974), AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Ryzen 9 7900X, 32 GB.

  • Probe at startup: operand guard (0 of 24576 probe results differ, 10 ms).

  • Pipeline creation for a synthetic compute program of random f32 add, sub and mul. main already includes #17227. Each pair ran on the same build with and without APS5_NO_NATIVE_F32_NANS:

    Instructions SPIR-V words main → PR Recompile ms First dispatch ms Checksum
    4,019 199,532 → 118,480 144.6 → 56.4 1,454.1 → 872.7 5979e000 both
    4,043 200,696 → 119,152 140.5 → 55.5 1,433.9 → 867.0 5979e000 both
    4,068 201,904 → 119,852 145.4 → 56.5 1,431.8 → 911.8 5979e000 both
    4,603 227,856 → 134,832 165.3 → 69.4 1,625.2 → 997.5 5979e000 both
    4,848 239,734 → 141,692 180.8 → 73.5 1,722.9 → 1,051.6 d979e000 both
    • The guard removes about 41% of the SPIR-V. It cuts the recompiler's time about 2.5× and the driver's first-dispatch compile about 1.6×.
    • Before #17227 the same kind of program took 11–13 s to compile and about 1 s with this change. Most of that gain is now in #17227, and this change covers the selects whose payload is observable.
    • The 4,043-instruction pair is from the head commit. The others are from the same change before it limited the guard to round-to-nearest-even, which the program does not change.
  • NaN-heavy program: 10,053 → 9,121 words, checksum 5dbf7838 on both.

  • Focused AGC and shader tests: 18/18 pass. agc_shader_memory and agc_shader_memory_coherent_atomic_loads pass after the version 58 update.

  • Validation run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, Vulkan SDK layer 1.4.368:

    • This PR: 17/17 pass.
    • main: 16/16 pass.
    • The layer was inserted in every test, with no "not found" and no VUID- errors.
  • tools/check_conventions.py passes.

  • ProsperoLight (PPSA99002 01.000.110) at 3840x2160 on main and on this PR:

    • Both runs use the same 10 s window from present 1197. performance_compare reports no configuration differences.
    • GPU busy is 6.181 → 6.050 ms per present, and frame percentiles are within 0.04 ms.
    • The title does not reach the emulated sequence at a size that matters, so this run shows no regression rather than a speedup.
    • The trace is from 1a4faa376f. The head commit differs from it only in tests/ShaderMemory.cpp, which now expects serialization version 58.

main:
seconds 20:10 from present 1197: 600 presents, frame p50 16.7 / p90 16.9 / p99 17.0 / max 17.0 ms, GPU busy 6.2 ms per present
AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC), Windows 10.0.26300, 3840x2160, commit 2db3a6bf65, dropped: no

{"commit":"2db3a6bf6581","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"20:10"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99002","title":"ProsperoLight","content_version":"01.000.110","resolution":"3840x2160","window":{"spec":"seconds 20:10","first_present":1197,"ms":10010.114},"presents":600,"frame_ms":{"p50":16.683,"p90":16.884,"p99":16.976,"max":17.024},"gpu_busy_ms_per_present":6.181,"worker_busy_pct":{"queue worker 0x0":8.817},"phase_totals_ms":{"Driver.Completion":0.776,"Driver.Draw":188.206,"Driver.Draw.device_setup":9.377,"Driver.Draw.draw_enqueued":30.810,"Driver.Draw.post_compile_prepare":0.868,"Driver.Draw.prepare":24.969,"Driver.Draw.shader_compile_and_link":119.070,"Driver.EndSubmission":1.729,"Driver.Packet":879.985,"Driver.Packet.device_lock":2.541,"Driver.Packet.draw":190.374,"Driver.Packet.execute":15.048,"Driver.Packet.flip_flush":28.694,"Driver.Packet.flush_between_packets":3.670,"Driver.Packet.pipeline_drain":615.738,"Driver.Packet.pipeline_prepare":3.954,"Driver.Packet.prepare_memory":4.196,"Driver.Present":615.615,"Driver.Present.acquire_image":290.446,"Driver.Present.device_setup":0.249,"Driver.Present.gpu_mutex_wait":0.994,"Driver.Present.inflight_wait":1.120,"Driver.Present.present_display_buffer":94.938,"Driver.Present.queue_present":208.309,"Driver.Present.release_and_callback":0.487,"Driver.Present.render_fence_wait":17.883,"Driver.Present.resize":0.736,"Driver.Present.validate":0.192,"Driver.Suspend":0.136,"GpuMutex.wait.draw":0.001,"GpuMutex.wait.end":0.001,"GpuMutex.wait.flush":0.001,"GpuMutex.wait.label":0.018,"GpuMutex.wait.wait":11.643,"Graphics.Draw":812.979,"Graphics.Draw.draw_and_resource_release":793.766,"Graphics.Draw.index_upload":0.390,"Graphics.Draw.validate":13.702,"Graphics.Draw.vertex_upload":1.993,"Recorder.Reap":45.658,"Recorder.Submit":247.930,"Recorder.Sync":6.745,"Recorder.WaitSerial":7.622,"Resources.Complete":38.121,"Resources.Prepare":58.199,"Shader.DrawStage":101.244,"Shader.DrawStage.capture_resources":69.109,"Shader.DrawStage.materialize":15.119,"Shader.DrawStage.prepared_invocation":15.953,"VideoOut.Flip":4564.353,"VideoOut.Flip.completion_mutex_wait":0.436,"VideoOut.Flip.config_mutex_wait":0.035,"VideoOut.Flip.frame_limit":0.966,"VideoOut.Flip.notify_game":7.467,"VideoOut.Flip.present":616.209,"VideoOut.Flip.validate":0.468,"VideoOut.Flip.vblank_wait":3924.076,"VideoOut.Flip.window_prepare":0.830,"VideoOut.Flip.window_title":21.012,"VideoOut.Readiness":0.820,"VideoOut.Readiness.locks_validate":0.252,"Vulkan.Acquire":289.910,"Vulkan.Acquire.acquire_fence_wait":253.216,"Vulkan.Acquire.acquire_image":34.797,"Vulkan.Acquire.fence_reset":0.928,"Vulkan.Acquire.retired_swapchains":0.754,"Vulkan.Present":42.256,"Vulkan.Present.command_record_scale":15.461,"Vulkan.Present.pixel_upload":0.971,"Vulkan.Present.queue_submit":25.483,"Vulkan.QueuePresent":207.501,"Vulkan.QueuePresent.queue_present":206.713,"Vulkan.Retire":17.763,"Vulkan.Retire.wait":14.168},"top_phases_ms_per_frame":{"VideoOut.Flip":7.607,"VideoOut.Flip.vblank_wait":6.540,"Driver.Packet":1.467,"Graphics.Draw":1.355,"Graphics.Draw.draw_and_resource_release":1.323,"VideoOut.Flip.present":1.027,"Driver.Packet.pipeline_drain":1.026,"Driver.Present":1.026},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":10800,"Graphics.Barrier.label-run":11982,"Graphics.Barrier.present-blit":1200,"Graphics.RenderPass":5400,"Graphics.RenderPass.Close.new-batch":5400,"Graphics.RenderPass.Continued":1800},"trace_dropped":false,"trace":"aps5-trace-2db3a6bf6581-25884.json.gz"}

This PR:
seconds 20:10 from present 1197: 600 presents, frame p50 16.7 / p90 16.9 / p99 17.0 / max 17.1 ms, GPU busy 6.0 ms per present
AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC), Windows 10.0.26300, 3840x2160, commit 1a4faa376fd1, dropped: no

{"commit":"1a4faa376fd1","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"20:10"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99002","title":"ProsperoLight","content_version":"01.000.110","resolution":"3840x2160","window":{"spec":"seconds 20:10","first_present":1197,"ms":10010.031},"presents":600,"frame_ms":{"p50":16.683,"p90":16.868,"p99":16.984,"max":17.059},"gpu_busy_ms_per_present":6.050,"worker_busy_pct":{"queue worker 0x0":8.789},"phase_totals_ms":{"Driver.Completion":0.756,"Driver.Draw":189.118,"Driver.Draw.device_setup":9.039,"Driver.Draw.draw_enqueued":30.431,"Driver.Draw.post_compile_prepare":0.855,"Driver.Draw.prepare":24.701,"Driver.Draw.shader_compile_and_link":120.859,"Driver.EndSubmission":1.514,"Driver.Packet":877.354,"Driver.Packet.device_lock":2.555,"Driver.Packet.draw":191.220,"Driver.Packet.execute":15.168,"Driver.Packet.flip_flush":27.966,"Driver.Packet.flush_between_packets":3.569,"Driver.Packet.pipeline_drain":613.768,"Driver.Packet.pipeline_prepare":3.843,"Driver.Packet.prepare_memory":4.160,"Driver.Present":627.937,"Driver.Present.acquire_image":305.143,"Driver.Present.device_setup":0.213,"Driver.Present.gpu_mutex_wait":1.030,"Driver.Present.inflight_wait":1.169,"Driver.Present.present_display_buffer":93.615,"Driver.Present.queue_present":202.100,"Driver.Present.release_and_callback":0.492,"Driver.Present.render_fence_wait":22.985,"Driver.Present.resize":0.770,"Driver.Present.validate":0.153,"Driver.Suspend":0.134,"GpuMutex.wait.end":0.001,"GpuMutex.wait.flush":0.002,"GpuMutex.wait.label":0.013,"GpuMutex.wait.wait":10.258,"Graphics.Draw":811.484,"Graphics.Draw.draw_and_resource_release":792.051,"Graphics.Draw.index_upload":0.393,"Graphics.Draw.validate":13.658,"Graphics.Draw.vertex_upload":2.107,"Recorder.Reap":44.336,"Recorder.Submit":236.489,"Recorder.Sync":6.595,"Recorder.WaitSerial":6.861,"Resources.Complete":37.912,"Resources.Prepare":58.533,"Shader.DrawStage":102.748,"Shader.DrawStage.capture_resources":70.200,"Shader.DrawStage.materialize":15.301,"Shader.DrawStage.prepared_invocation":16.135,"VideoOut.Flip":4612.352,"VideoOut.Flip.completion_mutex_wait":0.436,"VideoOut.Flip.config_mutex_wait":0.030,"VideoOut.Flip.frame_limit":0.984,"VideoOut.Flip.notify_game":13.738,"VideoOut.Flip.present":628.652,"VideoOut.Flip.validate":0.445,"VideoOut.Flip.vblank_wait":3952.265,"VideoOut.Flip.window_prepare":1.008,"VideoOut.Flip.window_title":21.038,"VideoOut.Readiness":0.781,"VideoOut.Readiness.locks_validate":0.247,"Vulkan.Acquire":304.615,"Vulkan.Acquire.acquire_fence_wait":268.535,"Vulkan.Acquire.acquire_image":34.308,"Vulkan.Acquire.fence_reset":0.886,"Vulkan.Acquire.retired_swapchains":0.689,"Vulkan.Present":40.597,"Vulkan.Present.command_record_scale":15.137,"Vulkan.Present.pixel_upload":0.937,"Vulkan.Present.queue_submit":24.206,"Vulkan.QueuePresent":201.318,"Vulkan.QueuePresent.queue_present":200.613,"Vulkan.Retire":22.932,"Vulkan.Retire.wait":19.328},"top_phases_ms_per_frame":{"VideoOut.Flip":7.687,"VideoOut.Flip.vblank_wait":6.587,"Driver.Packet":1.462,"Graphics.Draw":1.352,"Graphics.Draw.draw_and_resource_release":1.320,"VideoOut.Flip.present":1.048,"Driver.Present":1.047,"Driver.Packet.pipeline_drain":1.023},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":10800,"Graphics.Barrier.label-run":11978,"Graphics.Barrier.present-blit":1200,"Graphics.RenderPass":5400,"Graphics.RenderPass.Close.new-batch":5400,"Graphics.RenderPass.Continued":1800},"trace_dropped":false,"trace":"aps5-trace-1a4faa376fd1-27520.json.gz"}

Traces and digests attached.

Overlap:

  • #19710 adds directed rounding to the same f32 add, sub and mul path. The guard is skipped under a directed mode, so the two do not interact; whichever lands second has a textual conflict in floatBinary.
  • #20156 runs the startup probes as RDNA for PS4 titles. If it lands first, ProbeFloat32SingleNans belongs inside its RDNA section.
  • Several open PRs also take serialization version 58; the later one renumbers.

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 Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300.9974)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5315558522 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20187). Originally posted by [Ketz7](https://github.com/Ketz7) on 2026-11-14T19:52:51Z. --- ### What - Outside `IEEE_MODE`, the emitter rebuilds RDNA's NaN result for every `v_add_f32`, `v_sub_f32`, `v_subrev_f32` and `v_mul_f32` (`nanResultF32` / `propagatedNanResultF32`). That sequence dominates the SPIR-V of large compute programs and the time the driver spends compiling them, which is what trips the title watchdogs in #6118 and #12089 (see also #11183). #17227 already drops the selects whose payload nothing observes; this change covers the ones that remain. - On the RX 7900 XT the device already returns RDNA's NaN whenever only one operand is a NaN; it differs only when both are different NaNs. The new path puts an operand guard in front of the native instruction instead: when the operand RDNA would return is a NaN, the other operand becomes 0, so the hardware only ever sees one NaN. `v_mul_f32` keeps its tiny-product flush. - A startup probe (`ProbeFloat32SingleNans`, `Execution/src/Float32NanProbe.cpp`), in the style of `FloatFlushProbe`, runs the four instructions over every ordered pair of four buffer-loaded registers. It covers 32 lanes and 8 rounds of quiet and signalling NaNs with different payloads and signs, infinities, zeros, normals and denormals, with no float mode and with denormals flushed. It compiles each mode once with the emulated NaN and once with the guard, and compares 24,576 results bit for bit. It takes about 10 ms. - `SpirvTarget::float32SingleNans` is set only when every result matches. It is part of the cache key and of the serialized request (version 58; older requests read as `false`). - The guard applies only when f32 rounds to nearest even, the only mode the probe checks. `APS5_FAST_F32`, `IEEE_MODE`, a directed f32 rounding mode and the fused forms keep their current paths. `APS5_NO_NATIVE_F32_NANS` skips the probe. - `agc_shader_replay --f32-single-nans` replays a request with the flag. - New GPU test `tests/execution/Float32NanProbe.cpp`. It checks that the guarded module is smaller than the emulated one, that `IEEE_MODE` output is unchanged by the flag, that the probe compares all 24,576 results, and that a device with the flag set reports no mismatch. - `RequestSerializerTests` covers version 58: round trip, truncation, a version 57 request and the future-version check. - Docs: `ARCHITECTURE.md` section, `ENVIRONMENT.md` row, and a debt entry in `docs/dev/debt/libSceAgcDriver.md`. The debt entry records what the probe cannot see: a different compiler choice on larger programs, other stages and wave64. ### Tested - Windows 11 Pro 26H2 (build 26300.9974), AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Ryzen 9 7900X, 32 GB. - Probe at startup: `operand guard (0 of 24576 probe results differ, 10 ms)`. - Pipeline creation for a synthetic compute program of random f32 add, sub and mul. `main` already includes #17227. Each pair ran on the same build with and without `APS5_NO_NATIVE_F32_NANS`: | Instructions | SPIR-V words `main` → PR | Recompile ms | First dispatch ms | Checksum | | ---: | ---: | ---: | ---: | --- | | 4,019 | 199,532 → 118,480 | 144.6 → 56.4 | 1,454.1 → 872.7 | `5979e000` both | | 4,043 | 200,696 → 119,152 | 140.5 → 55.5 | 1,433.9 → 867.0 | `5979e000` both | | 4,068 | 201,904 → 119,852 | 145.4 → 56.5 | 1,431.8 → 911.8 | `5979e000` both | | 4,603 | 227,856 → 134,832 | 165.3 → 69.4 | 1,625.2 → 997.5 | `5979e000` both | | 4,848 | 239,734 → 141,692 | 180.8 → 73.5 | 1,722.9 → 1,051.6 | `d979e000` both | - The guard removes about 41% of the SPIR-V. It cuts the recompiler's time about 2.5× and the driver's first-dispatch compile about 1.6×. - Before #17227 the same kind of program took 11–13 s to compile and about 1 s with this change. Most of that gain is now in #17227, and this change covers the selects whose payload is observable. - The 4,043-instruction pair is from the head commit. The others are from the same change before it limited the guard to round-to-nearest-even, which the program does not change. - NaN-heavy program: 10,053 → 9,121 words, checksum `5dbf7838` on both. - Focused AGC and shader tests: 18/18 pass. `agc_shader_memory` and `agc_shader_memory_coherent_atomic_loads` pass after the version 58 update. - Validation run with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, Vulkan SDK layer 1.4.368: - This PR: 17/17 pass. - `main`: 16/16 pass. - The layer was inserted in every test, with no "not found" and no `VUID-` errors. - `tools/check_conventions.py` passes. - ProsperoLight (PPSA99002 01.000.110) at 3840x2160 on `main` and on this PR: - Both runs use the same 10 s window from present 1197. `performance_compare` reports no configuration differences. - GPU busy is 6.181 → 6.050 ms per present, and frame percentiles are within 0.04 ms. - The title does not reach the emulated sequence at a size that matters, so this run shows no regression rather than a speedup. - The trace is from `1a4faa376f`. The head commit differs from it only in `tests/ShaderMemory.cpp`, which now expects serialization version 58. `main`: **seconds 20:10** from present 1197: 600 presents, frame p50 16.7 / p90 16.9 / p99 17.0 / max 17.0 ms, GPU busy 6.2 ms per present AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC), Windows 10.0.26300, 3840x2160, commit 2db3a6bf6581, dropped: no ```json {"commit":"2db3a6bf6581","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"20:10"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99002","title":"ProsperoLight","content_version":"01.000.110","resolution":"3840x2160","window":{"spec":"seconds 20:10","first_present":1197,"ms":10010.114},"presents":600,"frame_ms":{"p50":16.683,"p90":16.884,"p99":16.976,"max":17.024},"gpu_busy_ms_per_present":6.181,"worker_busy_pct":{"queue worker 0x0":8.817},"phase_totals_ms":{"Driver.Completion":0.776,"Driver.Draw":188.206,"Driver.Draw.device_setup":9.377,"Driver.Draw.draw_enqueued":30.810,"Driver.Draw.post_compile_prepare":0.868,"Driver.Draw.prepare":24.969,"Driver.Draw.shader_compile_and_link":119.070,"Driver.EndSubmission":1.729,"Driver.Packet":879.985,"Driver.Packet.device_lock":2.541,"Driver.Packet.draw":190.374,"Driver.Packet.execute":15.048,"Driver.Packet.flip_flush":28.694,"Driver.Packet.flush_between_packets":3.670,"Driver.Packet.pipeline_drain":615.738,"Driver.Packet.pipeline_prepare":3.954,"Driver.Packet.prepare_memory":4.196,"Driver.Present":615.615,"Driver.Present.acquire_image":290.446,"Driver.Present.device_setup":0.249,"Driver.Present.gpu_mutex_wait":0.994,"Driver.Present.inflight_wait":1.120,"Driver.Present.present_display_buffer":94.938,"Driver.Present.queue_present":208.309,"Driver.Present.release_and_callback":0.487,"Driver.Present.render_fence_wait":17.883,"Driver.Present.resize":0.736,"Driver.Present.validate":0.192,"Driver.Suspend":0.136,"GpuMutex.wait.draw":0.001,"GpuMutex.wait.end":0.001,"GpuMutex.wait.flush":0.001,"GpuMutex.wait.label":0.018,"GpuMutex.wait.wait":11.643,"Graphics.Draw":812.979,"Graphics.Draw.draw_and_resource_release":793.766,"Graphics.Draw.index_upload":0.390,"Graphics.Draw.validate":13.702,"Graphics.Draw.vertex_upload":1.993,"Recorder.Reap":45.658,"Recorder.Submit":247.930,"Recorder.Sync":6.745,"Recorder.WaitSerial":7.622,"Resources.Complete":38.121,"Resources.Prepare":58.199,"Shader.DrawStage":101.244,"Shader.DrawStage.capture_resources":69.109,"Shader.DrawStage.materialize":15.119,"Shader.DrawStage.prepared_invocation":15.953,"VideoOut.Flip":4564.353,"VideoOut.Flip.completion_mutex_wait":0.436,"VideoOut.Flip.config_mutex_wait":0.035,"VideoOut.Flip.frame_limit":0.966,"VideoOut.Flip.notify_game":7.467,"VideoOut.Flip.present":616.209,"VideoOut.Flip.validate":0.468,"VideoOut.Flip.vblank_wait":3924.076,"VideoOut.Flip.window_prepare":0.830,"VideoOut.Flip.window_title":21.012,"VideoOut.Readiness":0.820,"VideoOut.Readiness.locks_validate":0.252,"Vulkan.Acquire":289.910,"Vulkan.Acquire.acquire_fence_wait":253.216,"Vulkan.Acquire.acquire_image":34.797,"Vulkan.Acquire.fence_reset":0.928,"Vulkan.Acquire.retired_swapchains":0.754,"Vulkan.Present":42.256,"Vulkan.Present.command_record_scale":15.461,"Vulkan.Present.pixel_upload":0.971,"Vulkan.Present.queue_submit":25.483,"Vulkan.QueuePresent":207.501,"Vulkan.QueuePresent.queue_present":206.713,"Vulkan.Retire":17.763,"Vulkan.Retire.wait":14.168},"top_phases_ms_per_frame":{"VideoOut.Flip":7.607,"VideoOut.Flip.vblank_wait":6.540,"Driver.Packet":1.467,"Graphics.Draw":1.355,"Graphics.Draw.draw_and_resource_release":1.323,"VideoOut.Flip.present":1.027,"Driver.Packet.pipeline_drain":1.026,"Driver.Present":1.026},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":10800,"Graphics.Barrier.label-run":11982,"Graphics.Barrier.present-blit":1200,"Graphics.RenderPass":5400,"Graphics.RenderPass.Close.new-batch":5400,"Graphics.RenderPass.Continued":1800},"trace_dropped":false,"trace":"aps5-trace-2db3a6bf6581-25884.json.gz"} ``` This PR: **seconds 20:10** from present 1197: 600 presents, frame p50 16.7 / p90 16.9 / p99 17.0 / max 17.1 ms, GPU busy 6.0 ms per present AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC), Windows 10.0.26300, 3840x2160, commit 1a4faa376fd1, dropped: no ```json {"commit":"1a4faa376fd1","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"20:10"},"gpu":"AMD Radeon RX 7900 XT","driver":"AMD proprietary driver 26.10.1 (LLPC)","os":"Windows 10.0.26300","cpu":"AMD Ryzen 9 7900X 12-Core Processor","cpu_threads":24,"memory_mib":31904,"title_id":"PPSA99002","title":"ProsperoLight","content_version":"01.000.110","resolution":"3840x2160","window":{"spec":"seconds 20:10","first_present":1197,"ms":10010.031},"presents":600,"frame_ms":{"p50":16.683,"p90":16.868,"p99":16.984,"max":17.059},"gpu_busy_ms_per_present":6.050,"worker_busy_pct":{"queue worker 0x0":8.789},"phase_totals_ms":{"Driver.Completion":0.756,"Driver.Draw":189.118,"Driver.Draw.device_setup":9.039,"Driver.Draw.draw_enqueued":30.431,"Driver.Draw.post_compile_prepare":0.855,"Driver.Draw.prepare":24.701,"Driver.Draw.shader_compile_and_link":120.859,"Driver.EndSubmission":1.514,"Driver.Packet":877.354,"Driver.Packet.device_lock":2.555,"Driver.Packet.draw":191.220,"Driver.Packet.execute":15.168,"Driver.Packet.flip_flush":27.966,"Driver.Packet.flush_between_packets":3.569,"Driver.Packet.pipeline_drain":613.768,"Driver.Packet.pipeline_prepare":3.843,"Driver.Packet.prepare_memory":4.160,"Driver.Present":627.937,"Driver.Present.acquire_image":305.143,"Driver.Present.device_setup":0.213,"Driver.Present.gpu_mutex_wait":1.030,"Driver.Present.inflight_wait":1.169,"Driver.Present.present_display_buffer":93.615,"Driver.Present.queue_present":202.100,"Driver.Present.release_and_callback":0.492,"Driver.Present.render_fence_wait":22.985,"Driver.Present.resize":0.770,"Driver.Present.validate":0.153,"Driver.Suspend":0.134,"GpuMutex.wait.end":0.001,"GpuMutex.wait.flush":0.002,"GpuMutex.wait.label":0.013,"GpuMutex.wait.wait":10.258,"Graphics.Draw":811.484,"Graphics.Draw.draw_and_resource_release":792.051,"Graphics.Draw.index_upload":0.393,"Graphics.Draw.validate":13.658,"Graphics.Draw.vertex_upload":2.107,"Recorder.Reap":44.336,"Recorder.Submit":236.489,"Recorder.Sync":6.595,"Recorder.WaitSerial":6.861,"Resources.Complete":37.912,"Resources.Prepare":58.533,"Shader.DrawStage":102.748,"Shader.DrawStage.capture_resources":70.200,"Shader.DrawStage.materialize":15.301,"Shader.DrawStage.prepared_invocation":16.135,"VideoOut.Flip":4612.352,"VideoOut.Flip.completion_mutex_wait":0.436,"VideoOut.Flip.config_mutex_wait":0.030,"VideoOut.Flip.frame_limit":0.984,"VideoOut.Flip.notify_game":13.738,"VideoOut.Flip.present":628.652,"VideoOut.Flip.validate":0.445,"VideoOut.Flip.vblank_wait":3952.265,"VideoOut.Flip.window_prepare":1.008,"VideoOut.Flip.window_title":21.038,"VideoOut.Readiness":0.781,"VideoOut.Readiness.locks_validate":0.247,"Vulkan.Acquire":304.615,"Vulkan.Acquire.acquire_fence_wait":268.535,"Vulkan.Acquire.acquire_image":34.308,"Vulkan.Acquire.fence_reset":0.886,"Vulkan.Acquire.retired_swapchains":0.689,"Vulkan.Present":40.597,"Vulkan.Present.command_record_scale":15.137,"Vulkan.Present.pixel_upload":0.937,"Vulkan.Present.queue_submit":24.206,"Vulkan.QueuePresent":201.318,"Vulkan.QueuePresent.queue_present":200.613,"Vulkan.Retire":22.932,"Vulkan.Retire.wait":19.328},"top_phases_ms_per_frame":{"VideoOut.Flip":7.687,"VideoOut.Flip.vblank_wait":6.587,"Driver.Packet":1.462,"Graphics.Draw":1.352,"Graphics.Draw.draw_and_resource_release":1.320,"VideoOut.Flip.present":1.048,"Driver.Present":1.047,"Driver.Packet.pipeline_drain":1.023},"owned_draw_counts":{},"graphics_track":{"Graphics.Barrier.draw":10800,"Graphics.Barrier.label-run":11978,"Graphics.Barrier.present-blit":1200,"Graphics.RenderPass":5400,"Graphics.RenderPass.Close.new-batch":5400,"Graphics.RenderPass.Continued":1800},"trace_dropped":false,"trace":"aps5-trace-1a4faa376fd1-27520.json.gz"} ``` Traces and digests attached. Overlap: - #19710 adds directed rounding to the same f32 add, sub and mul path. The guard is skipped under a directed mode, so the two do not interact; whichever lands second has a textual conflict in `floatBinary`. - #20156 runs the startup probes as RDNA for PS4 titles. If it lands first, `ProbeFloat32SingleNans` belongs inside its RDNA section. - Several open PRs also take serialization version 58; the later one renumbers. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 7900 XT, AMD proprietary driver 26.10.1 (LLPC) 32.0.32015.7029, Windows 11 Pro 26H2 (build 26300.9974) - [x] AI-assisted: yes
MarcZX10 commented 2026-11-14 21:00:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T21:00:56Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the inspected implementation and compatibility paths support merging.

What I ran

Reviewed head 90065c79251514aca64aee41663aff17e282bbcf using repo_read.py to inspect the prepared diff and targeted source ranges. No tests or builds were run. The author-reported test results are not results from this review.

Results

Check Result Note
Changed-line review passed All changed lines were read
Targeted code paths passed Probe, guard, cache, serializer, replay
Tests and build not run Author-reported runs not independently confirmed

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests or build were run. Hardware behavior beyond the reported RX 7900 XT test was not verified. The prepared bundle excluded full file text for core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp; their changed regions were read through the pinned reader. All changed files listed in the review manifest were reviewed; no changed files were excluded by rule.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5907136019 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20187#pullrequestreview-5907136019). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T21:00:56Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the inspected implementation and compatibility paths support merging. ## What I ran Reviewed head `90065c79251514aca64aee41663aff17e282bbcf` using `repo_read.py` to inspect the prepared diff and targeted source ranges. No tests or builds were run. The author-reported test results are not results from this review. ## Results | Check | Result | Note | |---|---|---| | Changed-line review | passed | All changed lines were read | | Targeted code paths | passed | Probe, guard, cache, serializer, replay | | Tests and build | not run | Author-reported runs not independently confirmed | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No tests or build were run. Hardware behavior beyond the reported RX 7900 XT test was not verified. The prepared bundle excluded full file text for `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` and `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`; their changed regions were read through the pinned reader. All changed files listed in the review manifest were reviewed; no changed files were excluded by rule. ## To get this to a good state Nothing is required.

Pull request closed

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!20187
No description provided.