Skip to content

fix(shader): select an f32 add or sub NaN result once - #11490

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
parl0v:fix/f32-nan-result-select
Nov 7, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
parl0v:fix/f32-nan-result-select

Conversation

@parl0v

@parl0v parl0v commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

An f32 v_add_f32, v_sub_f32 or v_subrev_f32 result now goes through one NaN select instead of three. propagatedNanResultF32 picks the NaN to return from the sources first (first source, then second, then 0xffc00000, the same order as before) and selects it only when the host result is NaN. floatBinary uses it for FPAdd32 and FPSub32; FPMul32 and the FMA paths keep nanResultF32. The returned bits are the same in every case. Like nanResultF32, it returns the host result unchanged when APS5_FAST_F32 is set.

New test agc_f32_nan_result_selects recompiles a chain of four adds and subs and checks that every host OpFAdd/OpFSub result reaches the register through exactly one NaN select.

Based on main d59584e.

Why

Human Fall Flat (PPSA02429) sits on a black screen after the splash on a cold first boot. The game is not deadlocked: the GPU queue worker is inside vkCreateComputePipelines (nvgpucomp64.dll under AgcDriver::CreateComputePipeline, one core busy), so the render thread waits on its EOP equeue and the main thread waits on the render thread.

The pipelines are two Unity compute shaders of 18,640 code words each (wave64, 16x8 threads) that are 16,384 dependent v_sub_f32 v1, v1, vN. Each becomes about 2.63 M SPIR-V words, and on an RTX 3060 with driver 617.42 each takes about 5 minutes to create. Runs stopped before that never save the pipelines, so every short run looks like a hang. Once both are in the pipeline cache, they take 40 to 49 ms and the title screen comes up.

NVIDIA's compile time grows faster than the shader: 3.3 s at 1,000 subs, 20.8 s at 4,000 and 290 s at 16,384. I timed variants of the 4,000-sub shader on an earlier main (97d3346) to find the cause:

4,000-sub variant SPIR-V words pipeline create
main 718,404 20.8 s
without the input denormal flush 669,024 20.1 s
without the NaN selects 564,450 3.1 s
NaN selects nested (this PR) 672,990 13.8 s

The cost is in the three dependent selects that each add or sub result passed through on the dependency chain, not in the instruction count. Only the variant this PR implements keeps the results bit-exact. The reordering is exact because for an f32 add or sub a NaN source always makes the host result NaN (the module declares SignedZeroInfNanPreserve), so testing the result first and choosing among the source NaNs inside that branch returns the same bits as before.

The guest context signal=0x1e lines in the HFF log are the IL2CPP GC stopping the world through sceKernelRaiseException. In a traced run every raise (114) reached its handler and returned, and every collection got all of its acks, so the GC is not involved in the black screen.

Measured

Windows 10, RTX 3060 12 GB, NVIDIA 617.42, i5-12400F. main 48c160c against this PR 91317d3 (the head before the rebase onto d59584e), same machine and session. The traces, summary lines, digests and performance_compare.py outputs are in hff-traces-pr11490.zip.

Cold first boot to the title screen, the scene where the pipelines are built. Shader cache and driver shader cache emptied before each run, APS5_TRACE_SECONDS=0:640 (main) and 0:400 (this PR) so that the window covers both pipelines, APS5_TRACE_EVENTS=1048576:

main this PR
Vulkan.ComputePipeline, first shader 307.2 s 170.3 s
Vulkan.ComputePipeline, second shader 284.8 s 160.7 s
total 592.0 s 331.0 s (-44 %)
slowest frames (trace_digest.py) 310,381.5 and 285,022.8 ms 173,561.8 and 160,892.4 ms
{"commit":"48c160c58b58","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"0:640"},"gpu":"NVIDIA GeForce RTX 3060","driver":"NVIDIA 617.42","os":"Windows 10.0.19045","cpu":"12th Gen Intel(R) Core(TM) i5-12400F","cpu_threads":12,"memory_mib":32609,"title_id":"PPSA02429","title":"Human Fall Flat","content_version":"01.017.000","resolution":"1920x1080","window":{"spec":"seconds 0:640","first_present":0,"ms":640020.168},"presents":1439,"frame_ms":{"p50":22.669,"p90":32.188,"p99":83.159,"max":310381.538},"gpu_busy_ms_per_present":12.969,"worker_busy_pct":{"queue worker 0x0":94.844},"top_phases_ms_per_frame":{"Driver.Packet":421.835,"Driver.Packet.dispatch":413.813,"Driver.Dispatch":412.333,"Vulkan.ComputePipeline":411.693,"VideoOut.Flip":14.766,"Shader.PrepareArtifact":9.283,"VideoOut.Flip.present":9.072,"Driver.Present":9.069},"trace_dropped":true,"trace_dropped_threads":{"title":{"events_full_after_s":635.923,"events_lost":8857,"totals_full":false}},"trace":"aps5-trace-48c160c58b58-8516.json.gz"}
{"commit":"91317d34389f","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"0:400"},"gpu":"NVIDIA GeForce RTX 3060","driver":"NVIDIA 617.42","os":"Windows 10.0.19045","cpu":"12th Gen Intel(R) Core(TM) i5-12400F","cpu_threads":12,"memory_mib":32609,"title_id":"PPSA02429","title":"Human Fall Flat","content_version":"01.017.000","resolution":"1920x1080","window":{"spec":"seconds 0:400","first_present":0,"ms":400004.767},"presents":2192,"frame_ms":{"p50":26.609,"p90":31.762,"p99":42.340,"max":173561.800},"gpu_busy_ms_per_present":15.296,"worker_busy_pct":{"queue worker 0x0":89.325},"top_phases_ms_per_frame":{"Driver.Packet":163.001,"Driver.Packet.dispatch":153.638,"Driver.Dispatch":151.910,"Vulkan.ComputePipeline":151.235,"VideoOut.Flip":14.080,"VideoOut.Flip.present":10.685,"Driver.Present":10.682,"Driver.Present.render_fence_wait":10.278},"trace_dropped":true,"trace_dropped_threads":{"title":{"events_full_after_s":371.988,"events_lost":59483,"totals_full":false}},"trace":"aps5-trace-91317d34389f-6752.json.gz"}

Warm title screen, as the Performance report form describes (scene run once, title restarted, APS5_TRACE_SECONDS=30:30, no other trace or profile switch): frame p50 28.9 / 28.9 ms, p90 32.5 / 31.9 ms, p99 36.0 / 35.1 ms, GPU busy 19.1 / 18.8 ms per present (main / this PR). The two shaders run only at boot, so with warm caches this PR changes no frame time, and I make no frame-time claim.

{"commit":"48c160c58b58","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"30:30"},"gpu":"NVIDIA GeForce RTX 3060","driver":"NVIDIA 617.42","os":"Windows 10.0.19045","cpu":"12th Gen Intel(R) Core(TM) i5-12400F","cpu_threads":12,"memory_mib":32609,"title_id":"PPSA02429","title":"Human Fall Flat","content_version":"01.017.000","resolution":"1920x1080","window":{"spec":"seconds 30:30","first_present":1107,"ms":30007.342},"presents":1038,"frame_ms":{"p50":28.907,"p90":32.488,"p99":35.981,"max":40.021},"gpu_busy_ms_per_present":19.103,"worker_busy_pct":{"queue worker 0x0":48.725},"top_phases_ms_per_frame":{"Driver.Packet":14.083,"VideoOut.Flip":14.049,"Driver.Present":13.982,"VideoOut.Flip.present":13.972,"Driver.Present.render_fence_wait":13.710,"Vulkan.Retire":13.710,"Vulkan.Retire.wait":13.696,"Graphics.Draw":10.248},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":28.247,"events_lost":16522,"totals_full":false},"title":{"events_full_after_s":15.246,"events_lost":32817,"totals_full":false}},"trace":"aps5-trace-48c160c58b58-5396.json.gz"}
{"commit":"91317d34389f","dirty":false,"env":{"APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"30:30"},"gpu":"NVIDIA GeForce RTX 3060","driver":"NVIDIA 617.42","os":"Windows 10.0.19045","cpu":"12th Gen Intel(R) Core(TM) i5-12400F","cpu_threads":12,"memory_mib":32609,"title_id":"PPSA02429","title":"Human Fall Flat","content_version":"01.017.000","resolution":"1920x1080","window":{"spec":"seconds 30:30","first_present":1125,"ms":30009.779},"presents":1044,"frame_ms":{"p50":28.861,"p90":31.933,"p99":35.055,"max":50.552},"gpu_busy_ms_per_present":18.756,"worker_busy_pct":{"queue worker 0x0":49.471},"top_phases_ms_per_frame":{"Driver.Packet":14.218,"VideoOut.Flip":13.721,"Driver.Present":13.663,"VideoOut.Flip.present":13.653,"Driver.Present.render_fence_wait":13.400,"Vulkan.Retire":13.399,"Vulkan.Retire.wait":13.386,"Graphics.Draw":10.354},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":27.147,"events_lost":27401,"totals_full":false},"title":{"events_full_after_s":14.487,"events_lost":35342,"totals_full":false}},"trace":"aps5-trace-91317d34389f-10016.json.gz"}

Caveats:

  • The cold capture breaks the form's warm-cache rule on purpose, because the change only shows while the pipelines are built. The two cold windows differ in length because main needs 592 s for the two pipelines. Compare the Vulkan.ComputePipeline slices, not the frame percentiles.
  • I captured this PR's cold run with stdout redirected to a file. On this main, HFF runs that print to the console window often stop at about 475 presents before the pipelines are built: 2 of 4 boots of main and 7 of 9 boots of this PR did that, and all 3 boots of this PR with the log in a file got through. Since main stalls the same way, that is a separate problem from this PR. Logging does not change pipeline creation time.
  • Every trace reports dropped: yes.

Pipeline creation in a replay harness: the captured layout replayed with the SPIR-V each build generates, main 570089a, every SPIR-V new to the driver cache:

arm 4,000 subs: words run 1 run 2 16,384 subs (the game's shader): words create
main 723,368 24.5 s 24.4 s 2,630,336 279.5 s
main + #4287 712,987 10.1 s 10.1 s 2,593,415 191.2 s
main + this PR 677,954 14.1 s 14.1 s 2,436,092 167.8 s
main + #4287 + this PR 676,880 11.6 s 11.6 s 2,435,008 166.9 s

Tested

Windows 10 (19045), RTX 4060 8 GB, NVIDIA 617.42, MinGW GCC 15.2 Release build, on main d59584e and this PR 022191e, same machine and session. Khronos validation layer from Vulkan SDK 1.4.363.0 on (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_KHRONOS_VALIDATION_REPORT_FLAGS=error,warn, ANYPS5_REQUIRE_VULKAN=1); the loader inserted it in all 16 GPU tests on both builds and it reported 0 errors and 0 warnings (no VUID). main ran with only F32NanResultSelects.cpp and its CMake fragment added. Command, from each build directory:

ctest -V --timeout 300 -R "^(agc_f32_nan_result_selects|agc_redundant_value_elimination|agc_denormal_flush_elimination|agc_integer_folding|agc_f32_denorm_preserve|agc_driver_f32_arithmetic_nan|agc_driver_f32_arithmetic_nan_fast|agc_driver_f32_add_mul_denormal_modes|agc_driver_f32_denormal_flush|agc_driver_f32_output_modifier|agc_driver_f32_result_clamp|agc_driver_dx10_clamp|agc_driver_nan_quieting|agc_driver_f32_min_max_nan|agc_driver_fma_legacy|agc_driver_fma_rounding|agc_driver_division|agc_driver_f32_separate_rounding|agc_driver_f32_constant_factor_tininess|agc_driver_lds_add_f32|agc_driver_sdwa_cvt_f32_ubyte)$"
test main d59584e this PR 022191e
agc_f32_nan_result_selects fails: each of the 8 add/sub results passes 3 NaN selects passes: 1 select each
4 recompiler tests 4 of 4 pass 4 of 4 pass
16 GPU tests 16 of 16 pass 16 of 16 pass
total 20 of 21 21 of 21
  • Recompiler: agc_redundant_value_elimination, agc_denormal_flush_elimination, agc_integer_folding, agc_f32_denorm_preserve.
  • GPU: agc_driver_f32_arithmetic_nan, agc_driver_f32_arithmetic_nan_fast (APS5_FAST_F32=1), agc_driver_f32_add_mul_denormal_modes, agc_driver_f32_denormal_flush, agc_driver_f32_output_modifier, agc_driver_f32_result_clamp, agc_driver_dx10_clamp, agc_driver_nan_quieting, agc_driver_f32_min_max_nan, agc_driver_fma_legacy, agc_driver_fma_rounding, agc_driver_division, agc_driver_f32_separate_rounding, agc_driver_f32_constant_factor_tininess, agc_driver_lds_add_f32 and agc_driver_sdwa_cvt_f32_ubyte.
  • agc_driver_f32_add_mul_denormal_modes passes on both but runs 0 of its 4 modes on this GPU (the test reports that they need DenormPreserve 32).
  • On the head before the rebase (91317d3, RTX 3060 12 GB, NVIDIA 617.42): the new test also passed with this PR stacked on perf(shader): pick the f32 NaN result with one quiet and one fallback select #4287, and Human Fall Flat reached the title screen on a cold boot and kept presenting (2,897 presents at 416 s, 34 FPS).

Related

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4060 8 GB (tests on this head) and RTX 3060 12 GB (captures on the earlier head), driver 617.42, Windows 10
  • AI-assisted: yes

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 26, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the new helper and the add/sub call sites. The source-priority order and quietNan32 handling match the previous nanResultF32 path, and the new structural test checks the result-dependent select chain. I also verified #4287 is still open and that the two current PR heads merge cleanly in either order; I found no conflict there.

Two repository gates remain:

  1. This head is 114 commits behind current main (check_main_sync.py --strict); the current-main tree differs from the tested base in OperandAccess.cpp, which this PR also changes. Please sync the branch and rerun the focused shader tests, including the NaN behavior tests, on the updated base/head. Current hosted checks are conventions, eligibility, intake, labels and report only; product/GPU jobs are skipped by path policy. I did not independently run the GPU suite.
  2. The description claims a 40% reduction in the title's cold-start wait and gives pipeline creation timings, but it does not include the required tools/trace_digest.py main/change summaries or trace attachments. The repo's speed-claim rule requires those captures from the same machine and scene. Please add the prescribed evidence, or revise the speed claim if that capture protocol cannot measure this shader-pipeline case.

The checklist says Unblocks: PPSA02429 without a Game bring-up discussion reference. I found no matching issue or discussion by title ID in the repository; please link the relevant discussion if one exists, otherwise mark the field none.

@parl0v
parl0v force-pushed the fix/f32-nan-result-select branch from 6341e0f to 91317d3 Compare October 26, 2026 17:34
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/shader/recompiler/Translation/src/FloatInstructions.cpp
PR 7410 core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp
core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp

@parl0v

parl0v commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @MarcZX10. I've addressed all three points:

  1. Sync: the branch is rebased onto main 48c160c as a single commit, 91317d3 (check_main_sync.py --strict: 1 ahead, 0 behind). On that base, on my RTX 3060 (Windows 10, NVIDIA 617.42):
    • agc_f32_nan_result_selects still fails on main (3 NaN selects on each of the 8 add/sub results) and passes with this PR (1).
    • 19 focused tests pass on both main and the PR: the recompiler tests agc_redundant_value_elimination, agc_denormal_flush_elimination, agc_integer_folding and agc_f32_denorm_preserve, and the f32/NaN/FMA/division GPU tests. The full list is in the description.
  2. Speed claim: I captured main and this PR in HFF on the same machine in the same session, and put the traces, summary lines, digests and performance_compare.py outputs in hff-traces-pr11490.zip.
    • The change only shows while the two compute pipelines are built, so the scene is the cold first boot to the title screen. Vulkan.ComputePipeline takes 307.2 s + 284.8 s on main and 170.3 s + 160.7 s with this PR (592.0 s to 331.0 s).
    • The warm title-screen capture the form asks for shows no frame-time change (p50 28.9 / 28.9 ms, p99 36.0 / 35.1 ms). The claim is now worded as pipeline-creation time, not frame time.
    • The cold capture breaks the form's warm-cache rule on purpose, and the description lists the other deviations.
  3. Checklist: Unblocks: is now none.

@github-actions github-actions Bot added build shader core/shader agc libSceAgc* and removed unblocks title Names a title ID on the Unblocks line labels Oct 26, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 27, 2026
@DeveshB-1

Copy link
Copy Markdown
Contributor

Verified on AMD RADV under Vulkan validation layers:

Environment:

  • OS: Arch Linux (kernel 7.1.4-arch1-1, x86_64), GCC 15.2.1
  • GPU: AMD Radeon Graphics (RADV RENOIR, Vulkan 1.4.354, vendor 0x1002, device 0x15e7)
  • Test flags: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer

Baseline on main (ca0e9557aa):

  • Ran focused test suite:
    ctest --test-dir build -R "^(agc_redundant_value_elimination|agc_denormal_flush_elimination|agc_integer_folding|agc_f32_denorm_preserve|agc_driver_f32_arithmetic_nan|agc_driver_f32_add_mul_denormal_modes|agc_driver_f32_output_modifier|agc_driver_f32_result_clamp|agc_driver_division|agc_driver_division_output_modifiers|agc_driver_division_result_modifiers|agc_driver_fma_legacy|agc_driver_fma_rounding|agc_driver_f32_min_max_nan|agc_driver_f32_min_max_denormal_modes|agc_driver_f32_separate_rounding|agc_driver_f32_constant_factor_tininess|agc_driver_lds_add_f32|agc_driver_sdwa_cvt_f32_ubyte)$" -V
  • Result: 19/19 passed (0 VUID- validation errors; validation layers confirmed loaded and unloaded).

PR branch (91317d3438):

  • Ran focused test suite with the new test:
    ctest --test-dir build -R "^(agc_f32_nan_result_selects|agc_redundant_value_elimination|agc_denormal_flush_elimination|agc_integer_folding|agc_f32_denorm_preserve|agc_driver_f32_arithmetic_nan|agc_driver_f32_add_mul_denormal_modes|agc_driver_f32_output_modifier|agc_driver_f32_result_clamp|agc_driver_division|agc_driver_division_output_modifiers|agc_driver_division_result_modifiers|agc_driver_fma_legacy|agc_driver_fma_rounding|agc_driver_f32_min_max_nan|agc_driver_f32_min_max_denormal_modes|agc_driver_f32_separate_rounding|agc_driver_f32_constant_factor_tininess|agc_driver_lds_add_f32|agc_driver_sdwa_cvt_f32_ubyte)$" -V
  • Result: 20/20 passed (0 VUID- validation errors; validation layers confirmed loaded and unloaded). agc_f32_nan_result_selects outputs: PASS: every f32 add and sub result passes one NaN select.

Negative Control:

  • Temporarily reverted FloatInstructions.cpp to route FPAdd32 and FPSub32 through nanResultF32 instead of propagatedNanResultF32.
  • agc_f32_nan_result_selects failed deterministically as expected:
    FAIL: the v_add_f32 result 795 passes 3 NaN selects before the register holds it, expected 1
    (failed across all 8 add/sub results with 3 NaN selects detected).
  • Restoring the branch code returned to 20/20 passing.
  • python3 tools/check_conventions.py --base upstream/main passes cleanly.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — changes requested

The author addressed the prior evidence and checklist requests: the PR now includes matched summary lines, linked traces/digests, reports no frame-time claim, and sets Unblocks: none. The remaining blocker is that the tested base is stale and current main changed the same shader paths.

What I checked

  • Reviewed exact head 91317d34389f88d66829f098190a0ff24330d8db against current main 4c7d275bef89d309313d16bc2bc05d37a1b50be2.
  • Confirmed the current merge preview is clean.
  • Current main changed FloatInstructions.cpp, TranslationContext.hpp, and the AGC test CMake file, all also touched by this PR.
  • git diff --check is clean and tools/check_conventions.py passes against current main.
  • Hosted checks for this head are policy/report checks; the product/GPU jobs are skipped.

Required before approval

Please integrate current main and rerun the NaN-select structural test plus the focused recompiler and GPU arithmetic tests on the updated base and change using the same GPU and validation-layer settings. The existing Windows/NVIDIA and Linux/AMD runs are strong evidence for their reported heads, but they precede current main's edits to the affected translator paths.

The matched HFF capture evidence is already present in the PR body and linked archive. I am not asking you to repeat those captures as part of this integration request.

Not verified

I did not run a local shader build or GPU tests; no Vulkan device is exposed in this workspace.

@TechLevelZero

TechLevelZero commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 91317d3 merged onto main 73f4f7e · tested 2026-10-31 18:39 UTC · 19 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,430 passed · 4 failed (0 new, 4 also fail on main) · 50 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,484 of 3,072 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (924 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 37.4 s, ⚠️ agc_driver_graphics_maps_fallback 30.8 s
Failing on main too (4, not counted against this PR)
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_f32_nan_result_selects
Validation IDs already present on main (4 IDs in 426 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (426 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 418 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (50)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or pla
Reproduce
git fetch origin 91317d34389f88d66829f098190a0ff24330d8db 73f4f7e06e4f210a8c6570e335fd654dc0a86134
git checkout 73f4f7e06e4f210a8c6570e335fd654dc0a86134 && git merge --no-ff 91317d34389f88d66829f098190a0ff24330d8db
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 31, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, focused tests still needed

The branch now includes its merge from main, but the current-head Windows job compiled the new test executable without showing that CTest ran it, so I cannot clear the existing validation request.

What I ran

Reviewed head 9636fb02138145a97283dc335bcdabcf02609033 against its recorded base c2ba690bfc6597c3b33084057a02ffa7f0f49d10 and current main 26fa1212b82f76dd49cf12d65e445d6ff3e0844c. The exact-head merge preview against current main is clean. Environment: Debian GNU/Linux 12, Python 3.11.2, GCC 12.2.0 for repository tooling. I did not build or run C++ tests locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11490 --output-dir /tmp/anyps5-pr-precheck-11490
python3 tools/pr_stack_check.py 11490 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck-11490/stack-manual
python3 tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck-11490/head-9636fb021381-27fb20bc --json core/libs/prx/libSceAgcDriver/tests/F32NanResultSelects.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_f32_nan_result_selects_tests.cmake core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp core/shader/recompiler/Translation/src/FloatInstructions.cpp core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp
gh pr checks 11490 -R boykopovar/AnyPS5
gh run view 41291716789 --repo boykopovar/AnyPS5 --job 124805649155 --log

Results

Check Result
Diff and conventions Passed in the exact-head precheck.
Current-main merge preview Clean against 26fa1212b82f76dd49cf12d65e445d6ff3e0844c; the branch's second parent is c2ba690bfc6597c3b33084057a02ffa7f0f49d10. The only later main hunk in InstructionTranslator.cpp changes mesh-shader group indexing, not the f32 add/sub translation under review.
Test registration Confirmed: agc_f32_nan_result_selects is registered in the new CMake fragment. The heuristic's possible-unregistered-test warning is a false positive.
Exact-head Windows job The job passed and compiled/linked agc_f32_nan_result_selects_tests.exe. Its logged CTest result shows only one unrelated conventions test; it does not show agc_f32_nan_result_selects executing.
Other hosted checks Conventions, eligibility, labels, library-portability, report, relinker jobs, and relinker-asan passed. Linux, register-context, and write-watch were skipped.
Precheck helper availability The isolated checkout lacks workspace-only ABI and test-quality scripts, so those two precheck stages failed to execute. The test-quality script was run separately; its registration warning was manually checked.
Author-run tests in PR description The described Windows/GPU runs and structural test are for earlier head 91317d34389f88d66829f098190a0ff24330d8db, not merge head 9636fb02138145a97283dc335bcdabcf02609033.
Local build/CTest Not run.
Unedited selected output from the exact-head Windows job
[2/4] Building CXX object core/libs/prx/libSceAgcDriver/CMakeFiles/agc_f32_nan_result_selects_tests.dir/tests/F32NanResultSelects.cpp.obj
[3/4] Linking CXX executable tests\agc_f32_nan_result_selects_tests.exe
Test project D:/a/AnyPS5/AnyPS5/build
Start 181: conventions_env_reference_test_an_added_line_starting_with_plus_does_not_shift_the_reported_line
1/1 Test #181: conventions_env_reference_test_an_added_line_starting_with_plus_does_not_shift_the_reported_line ...   Passed    2.15 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) =   2.33 sec
Guest core/libs tests:
agc_f32_nan_result_selects_tests

Negative control

Assertion Change made to code under test Did the new test fail?
The optimized add/sub chain preserves the expected NaN result and select structure No mutation was run at merge head 9636fb02138145a97283dc335bcdabcf02609033 Not exercised at this head.

Findings

Blocking

The existing review asked for focused validation after integrating the shader-path changes from main. Although this branch now merges main, the current-head CTest log does not show the added structural test or the focused arithmetic tests running, and the PR's reported test results are for the prior head. Please run agc_f32_nan_result_selects and the focused f32/NaN arithmetic tests on current main and this exact head, using the same machine/GPU and validation-layer settings, then post the commands, heads, and results. The Windows CI build confirms compilation of the new executable but is not evidence that its test ran.

Non-blocking

The branch is behind current main, but the live merge preview is clean and the later main change in InstructionTranslator.cpp is in the unrelated mesh-shader prologue; I am not asking for another rebase on that basis. The performance evidence already in the PR compares the unchanged shader implementation; I am not asking for new captures in this follow-up.

Sources

Not verified

No local build or CTest, no current-head Linux GPU run, and no console behavior were verified in this session. The older author-run shader/GPU test data does not cover the exact merge head.

To get this to a good state

Post focused results for the updated base and exact head, including the actual agc_f32_nan_result_selects CTest output and the validation-layer status. I will rerun the same review checks on the new head.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

On 9636fb02138145a97283dc335bcdabcf02609033, nanResultF32 returns the raw result when ExactF32Arithmetic() is false (APS5_FAST_F32=1), but the new propagatedNanResultF32 has no equivalent guard. Add/sub now always build their NaN-selection path while multiply and FMA still honor that opt-out. Please retain the guard in the new helper and cover both modes: one NaN result select by default and no such selection when fast mode is enabled. This is a source finding; I have not measured a compile-time or game regression.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 9636fb0 merged onto main e6f5730 · tested 2026-11-01 18:10 UTC · 28 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,484 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,533 of 3,148 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (932 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.2 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_f32_nan_result_selects
Validation IDs already present on main (5 IDs in 484 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (484 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 476 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin 9636fb02138145a97283dc335bcdabcf02609033 e6f57307fa7f47165d7fc1bee945abdb2f6816e7
git checkout e6f57307fa7f47165d7fc1bee945abdb2f6816e7 && git merge --no-ff 9636fb02138145a97283dc335bcdabcf02609033
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@Filip722

Filip722 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

@parl0v the required overlap scan flags your header and floatBinary edits at head 9636fb0213 against my unpublished normal-finite-constant multiply fold. My change applies only to FPMul32; your add/sub helper remains independent. The mechanical combined caller would keep your FPAdd32/FPSub32 routes and pass the explicit multiplication intent only on the separate multiply route.

I propose your PR goes first and I reconcile that call afterward. Could you confirm the preferred merge order? I will declare an agreed dependency if the submitted branch builds on your changes. This is coordination, not a request to alter your arithmetic behavior.

AI-assisted: yes (Codex).

The concrete change is now available as draft #14892, including the isolated diff, arithmetic proof, matched focused hardware checks, a pinned-current-main native refresh and separately scoped ordinary gameplay evidence. The merge-order question remains open; that branch includes none of these overlapping PRs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 3, 2026

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

This pull request does not merge cleanly into main (4f41f4c): head 9636fb0 conflicts in

  • core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp
  • core/shader/recompiler/Translation/src/FloatInstructions.cpp

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

@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Additional Linux qualification for the combined #4287 + #11490 changes, followed by one Hamster Playground (PPSA06652, 01.009.000) kitchen comparison. This does not isolate either PR's effect.

Pinned main: d23df92b3805fea21493a73cbed8835c9e8548d0. Private composition: 2f3ad80f7829a98b9c4ebce586249bd22406a2d1. Peer heads inspected: #4287 81804d15089a6d2f850c751ee25d9344f1489948, #11490 9636fb02138145a97283dc335bcdabcf02609033. Original authorship retained. The composition preserves main's normal-factor optimization, multiplication flag and exact-arithmetic gate, and uses the current split test CMake layout. It also retains a private v54 request-serializer diagnostic change; shader-dump flags are disabled in both native arms. Exact source patch and source/build provenance are included in the artifact.

Ryzen 9 7950X, Radeon RX 6650 XT 8 GiB, RADV Mesa 26.2.6, Linux 7.2.11. Full SDK/relinker builds pass on both sides. Focused CPU/GPU gate: main 20/20, composition 21/21 (the extra check is agc_f32_nan_result_selects), zero skips, real validation layer inserted 16 times on each side, zero VUID- IDs and no missing-layer warning. Both use ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and serial CTest execution. Complete commands and verbose logs are attached.

Same kitchen scene, 3840×2160 main combined changes
FPS from official 30-second trace 24.185989 25.162215
Presents 726 755
Frame p50 / p99 (ms) 41.194 / 44.735 39.344 / 46.311
GPU busy ms/present 31.492 30.075

Single-pair difference: +4.04%. This is below the predeclared 5% continuation threshold; no reverse confirmation or further gain-seeking repeats were run. This does not establish a reliable speed gain, and p99 did not improve. It makes no isolated-PR, other-title, Windows or other-GPU claim. Newer main commits are outside this pinned comparison.

Both native runs exit 0 after ordinary close at 226.6 s (228.6 s total). All six 140/180/210 s captures were directly reviewed: same kitchen/camera, store promotion dismissed, no visible new rendering defect; freshness checks did not request review. Same frozen ordinary and memory saves and 463-entry warm HLE cache seed; initially empty private Mesa cache per arm. APS5_TRACE_SECONDS=150:30, no GPU/draw profiling flags, zero dropped trace events or sampled heavy compiler overlap in the monitored measurement interval. Original assets, frozen SDKs and cache seed stayed unchanged; kernel setting restored; no leftover private game PID.

Exact commands, verbose paired GPU logs, source composition, captures, official traces/summaries, trace digests and host samples, SHA-256 044f9bb07a1c88a3c94927df8e3b55a4b740ab40ae1f2527beee1796383d7300. No game binaries, saves, captured shader requests or shader binaries included. Artifact downloaded and hash-verified.

Official summary lines:

{"commit":"d23df92b3805","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.6-arch1.1","os":"Linux 7.2.11-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA06652","title":"Hamster Playground","content_version":"01.009.000","resolution":"3840x2160","window":{"spec":"seconds 150:30","first_present":5688,"ms":30017.379},"presents":726,"frame_ms":{"p50":41.194,"p90":43.027,"p99":44.735,"max":46.588},"gpu_busy_ms_per_present":31.492,"worker_busy_pct":{"queue worker 0x0":80.743},"top_phases_ms_per_frame":{"Driver.Packet":32.672,"Driver.Packet.draw":26.891,"Driver.Draw":26.813,"Driver.Draw.draw_enqueued":20.169,"Recorder.Sync":14.947,"Graphics.Draw":8.905,"Graphics.Draw.draw_and_resource_release":7.273,"VideoOut.Flip":6.996},"trace_dropped":false,"trace":"aps5-trace-d23df92b3805-1133788.json.gz"}
{"commit":"2f3ad80f7829","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"150:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.6-arch1.1","os":"Linux 7.2.11-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA06652","title":"Hamster Playground","content_version":"01.009.000","resolution":"3840x2160","window":{"spec":"seconds 150:30","first_present":5456,"ms":30005.307},"presents":755,"frame_ms":{"p50":39.344,"p90":42.265,"p99":46.311,"max":49.498},"gpu_busy_ms_per_present":30.075,"worker_busy_pct":{"queue worker 0x0":81.226},"top_phases_ms_per_frame":{"Driver.Packet":31.597,"Driver.Packet.draw":25.755,"Driver.Draw":25.678,"Driver.Draw.draw_enqueued":19.892,"Recorder.Sync":14.112,"Graphics.Draw":8.913,"Graphics.Draw.draw_and_resource_release":7.286,"VideoOut.Flip":6.621},"trace_dropped":false,"trace":"aps5-trace-2f3ad80f7829-1299027.json.gz"}

AI-assisted: yes (Codex). Additional validation of existing authors' changes; no duplicate implementation PR.

@parl0v
parl0v force-pushed the fix/f32-nan-result-select branch from 9636fb0 to 022191e Compare November 6, 2026 20:52
@parl0v

parl0v commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 I rebased the branch onto main d59584e. It is one commit again, 022191e, and replaces the merge commit 9636fb0. @oneandonlydean thanks for merging main in on 1.11.; I replaced it with a rebase because that merge missed the APS5_FAST_F32 early return (below).

What main changed under this PR, and how the fix fits:

I ran the tests on Windows 10 with an RTX 4060 8 GB and NVIDIA 617.42. Both builds were MinGW GCC 15.2 Release, made on the same machine in the same session. On main I added only the new test file and its CMake fragment. The Khronos validation layer from Vulkan SDK 1.4.363.0 was on, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_KHRONOS_VALIDATION_REPORT_FLAGS=error,warn and ANYPS5_REQUIRE_VULKAN=1. The loader inserted the layer in all 16 GPU tests on both builds, and it reported 0 errors, 0 warnings and no VUID.

test main d59584e this PR 022191e
agc_f32_nan_result_selects fails: each of the 8 add/sub results passes 3 NaN selects passes: 1 select each
4 recompiler tests 4 of 4 pass 4 of 4 pass
16 GPU tests (including agc_driver_f32_arithmetic_nan_fast) 16 of 16 pass 16 of 16 pass
total 20 of 21 21 of 21

agc_driver_f32_add_mul_denormal_modes passes on both builds, but it runs 0 of its 4 modes on this GPU because they need DenormPreserve 32. The full list of tests and the ctest command are in the Tested section of the description. The HFF captures are unchanged, as you said.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@oneandonlydean
oneandonlydean merged commit 313a4ac into boykopovar:main Nov 7, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants