test(agc): leave out v_cvt_f32_f64 sources below 2^-126 without DenormPreserve 32 #26142
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26142"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by root-over on 2026-11-23T10:21:22Z.
What
agc_driver_cvt_f32_f64_denormal_resultfails onmainon RADV Renoir (AMD Radeon Graphics, gfx90c, Mesa 26.0.8):The driver reports
shaderDenormPreserveFloat32. The device's startup probe still leaves it undeclared:[float-controls] f32 denormal preserve: not requested (20 of 256 probe results on normal values differ from the default mode by more than the Vulkan precision bounds). As a resultfloat32DenormPreserveis false, and the test leaves out values whose expected result is an f32 denormal. Without the mode, the driver also flushes an f64 source below 2^-126 before rounding, so a source that RDNA2 rounds up to0x00800000comes back as a zero of its sign.float32DenormPreserveis false, the test now also leaves out a source below 2^-126 if its expected result is not a zero. Results whose expected value is a flushed zero, which the translation selects from the source bits sinced94daee70c, are still checked on such devices.I instrumented the check locally and it leaves out 424 more values. 300 of them match anyway. The other 124 are all signed zeros where the table expects
±0x00800000, or0x01000000/0x01800000withmul:2/mul:4. They come from0x380fffffe0000000,0x380fffffe8000000and their negatives atFLOAT_MODE0xe0, 0xf0, 0xd1 and 0xd2. Devices that declareDenormPreserve 32(all three in the #21508 cross-check) skip nothing and check the full table as before.Tested
Ubuntu 26.04, GCC 15.2.0, Release,
main3492c18f81. GPU: AMD Radeon Graphics (RADV RENOIR, gfx90c), Mesa 26.0.8, Linux. Fullctest -j4onmain: 6669 of 6670 pass, and this is the only failure.With
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layerand validation layer 1.4.341,ctest --test-dir build -R '^agc_driver_cvt_f32_f64_denormal_result$' -V:mainInsert instance layer "VK_LAYER_KHRONOS_validation"was not found but was requested by env var VK_INSTANCE_LAYERSVUID-python3 tools/check_conventions.py --base origin/mainandpython3 tools/debt_fold.py --checkpass.pr_overlap.py --branchreports no overlap. #21508 changes another row of the same test's tables and merges cleanly with this branch.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T10:24:36Z.
Review: APPROVED
Reviewed — looks good
The full changed source and debt fragment at head
2f2441e2d277c753dff8dfd28d857acd372e883fsupport the test’s expanded skip condition; no blocking defect was identified. Nothing blocks this; the points below are optional.What I ran
Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Runtime behavior, build, tests, and prechecks were not independently verified. Repository files read:
core/libs/prx/libSceAgcDriver/tests/execution/CvtF32F64DenormalResult.cppanddocs/dev/debt/changes/test-agc-cvt-f32-f64-tiny-source-without-denorm-preserve.md. Both files listed as reviewed in the manifest were read; no files were excluded.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T10:41:25Z.
Review: CHANGES_REQUESTED
The tiny-source exception is broader than the measured native-Float64 driver case. On a Vulkan device without
Float64, this shader is supported throughstate.integerFloat64:ConvertF32F64is computed by the integerToF32helper and its packedu32is only bitcast tof32. A normal result such as0x00800000therefore does not depend on the driver's f64 denormal handling and should remain checked.I rebuilt and ran an extracted exact-
Checkpredicate at this head. For mode0xe0, lane 7, plain conversion of0x380fffffe0000000, replacing the correct0x00800000with0xdeadbeefis rejected by the prior condition but accepted by this head's new skip. The rational oracle counted 424 newly skipped cells, including 168 RNE plain/neg/abs cells; ten signed integer-backend mirrors matched the exact expected bits. Please restrict the tiny-f64-source exception to the native Float64 conversion path (the existing expected-f32-denormal exception can remain device-wide), and add a no-Float64/integer-backend negative control.Production path checked:
SpirvModuleSetup.cppselects integer Float64 when the device lacks the capability,SpirvAluEmitterFloat64.cpp::ToF32rounds/packs in integer operations, andEmitConvertF32F64bitcasts those bits. Vulkan definesOpBitcastas bit-preserving: https://docs.vulkan.org/spec/latest/appendices/spirvenv.html#spirvenv-precisionI did not run a GPU test; the author's Renoir A/B remains the evidence for the native path. A separate pre-existing hardware-FTZ edge seen by the CPU oracle is not part of this change request. Conventions, debt-fold and merge checks were independently clean.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-24T13:20:52Z.
Review: APPROVED
Rechecked exact head
692ad857b47b3a84a6fd3a58425ae897df3c5c40. The integer-Float64 gap from my previous review is fixed.The tiny-source exception is now passed separately and is enabled only for native Float64 when the device does not preserve f32 denormals. Each flush-mode case also runs through a separately recompiled integer backend with
Float64removed from the target, so tiny sources remain checked there. The capability vector outlives that recompilation, and the regression makes the integer path fail if the old broad skip returns.Contributor-reported hardware checks cover the exact head: R9700 ran all four passes, confirmed the skip only on the native backend, and made the integer
0xdeadbeefmutation fail; RTX 4070 ran 4/4 with the validation layer and no VUIDs. The hosted Windows selection does not execute this focused test, so I am not treating its green job as hardware evidence. No GPU test was run on my machine for this review.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-24T23:36:16Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed change is consistent with the stated goal, but project checks were not run in this review, so a formal approval is not justified.
What I ran
Reviewed head
692ad857b47b3a84a6fd3a58425ae897df3c5c40against basemain. No commands or project checks were run; the available interface provides read-only review tools. The author reports the targeted Vulkan test passed three runs and the convention and debt checks passed.Read every changed line in
core/libs/prx/libSceAgcDriver/tests/execution/CvtF32F64DenormalResult.cppanddocs/dev/debt/changes/test-agc-cvt-f32-f64-tiny-source-without-denorm-preserve.md. Also read the test’s Vulkan capability helper and the integer f64-to-f32 conversion helper. No changed files were excluded.Results
Negative control
Not run; no test execution environment was available to alter the code under test and confirm failure.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The author-reported test and static check results were not independently verified. GPU behavior on the reported RADV Renoir setup and other devices was not tested in this review.
To get this to a good state
Nothing is required. Optional: run the targeted test and the reported checks on this head in CI or a configured development environment.