Repository navigation
fix(shader): select an f32 add or sub NaN result once - #11490
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
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:
- This head is 114 commits behind current
main(check_main_sync.py --strict); the current-main tree differs from the tested base inOperandAccess.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. - 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.pymain/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.
6341e0f to
91317d3
Compare
|
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.
|
|
Thanks for the review, @MarcZX10. I've addressed all three points:
|
|
Verified on AMD RADV under Vulkan validation layers: Environment:
Baseline on
PR branch (
Negative Control:
|
MarcZX10
left a comment
There was a problem hiding this comment.
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
91317d34389f88d66829f098190a0ff24330d8dbagainst currentmain4c7d275bef89d309313d16bc2bc05d37a1b50be2. - Confirmed the current merge preview is clean.
- Current
mainchangedFloatInstructions.cpp,TranslationContext.hpp, and the AGC test CMake file, all also touched by this PR. git diff --checkis clean andtools/check_conventions.pypasses against currentmain.- 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.
✅ NVIDIA GPU test: passedPR head
Failing on main too (4, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 426 tests)Skipped (50)ReproduceAutomated 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. |
MarcZX10
left a comment
There was a problem hiding this comment.
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 --logResults
| 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
- New structural test at the reviewed head
- CTest registration at the reviewed head
- Changed add/sub translation at the reviewed head
- Changed-guest-test runner at the reviewed head
- Exact-head Windows job, Linux job skipped
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.
|
On |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 484 tests)Skipped (45)ReproduceAutomated 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. |
|
@parl0v the required overlap scan flags your header and 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. |
XairRrR
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
This pull request does not merge cleanly into main (4f41f4c): head 9636fb0 conflicts in
core/shader/recompiler/Translation/include/Translation/TranslationContext.hppcore/shader/recompiler/Translation/src/FloatInstructions.cpp
Please rebase it onto current main. I will review the change once it merges cleanly.
|
Additional Linux qualification for the combined #4287 + #11490 changes, followed by one Hamster Playground ( Pinned main: 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
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. Exact commands, verbose paired GPU logs, source composition, captures, official traces/summaries, trace digests and host samples, SHA-256 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. |
9636fb0 to
022191e
Compare
|
@MarcZX10 I rebased the branch onto What
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
|
What
An f32
v_add_f32,v_sub_f32orv_subrev_f32result now goes through one NaN select instead of three.propagatedNanResultF32picks the NaN to return from the sources first (first source, then second, then0xffc00000, the same order as before) and selects it only when the host result is NaN.floatBinaryuses it for FPAdd32 and FPSub32; FPMul32 and the FMA paths keepnanResultF32. The returned bits are the same in every case. LikenanResultF32, it returns the host result unchanged whenAPS5_FAST_F32is set.New test
agc_f32_nan_result_selectsrecompiles a chain of four adds and subs and checks that every hostOpFAdd/OpFSubresult reaches the register through exactly one NaN select.Based on
maind59584e.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.dllunderAgcDriver::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: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=0x1elines in the HFF log are the IL2CPP GC stopping the world throughsceKernelRaiseException. 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.
main48c160c against this PR 91317d3 (the head before the rebase onto d59584e), same machine and session. The traces, summary lines, digests andperformance_compare.pyoutputs 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) and0:400(this PR) so that the window covers both pipelines,APS5_TRACE_EVENTS=1048576:Vulkan.ComputePipeline, first shaderVulkan.ComputePipeline, second shadertrace_digest.py){"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:
Vulkan.ComputePipelineslices, not the frame percentiles.main, HFF runs that print to the console window often stop at about 475 presents before the pipelines are built: 2 of 4 boots ofmainand 7 of 9 boots of this PR did that, and all 3 boots of this PR with the log in a file got through. Sincemainstalls the same way, that is a separate problem from this PR. Logging does not change pipeline creation time.dropped: yes.Pipeline creation in a replay harness: the captured layout replayed with the SPIR-V each build generates,
main570089a, every SPIR-V new to the driver cache:Tested
Windows 10 (19045), RTX 4060 8 GB, NVIDIA 617.42, MinGW GCC 15.2 Release build, on
maind59584e 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).mainran with onlyF32NanResultSelects.cppand 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)$"maind59584eagc_f32_nan_result_selectsagc_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(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_f32andagc_driver_sdwa_cvt_f32_ubyte.agc_driver_f32_add_mul_denormal_modespasses on both but runs 0 of its 4 modes on this GPU (the test reports that they need DenormPreserve 32).Related
nanResultF32for all its users. That leaves 2 NaN selects on an add or sub result's chain, and it tests NaN withFPIsNan32. The two compose: perf(shader): pick the f32 NaN result with one quiet and one fallback select #4287 keeps covering mul, FMA and the othernanResultF32users, and with this PR on top, add and sub go throughpropagatedNanResultF32with 1 select. They merge without conflicts in either order.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)