fix(shader): flush v_div_scale_f64 denormals by the f64 denormal field #13846

Merged
Deftera186 merged 2 commits from upstream-pr/13846 into main 2026-11-01 04:50:24 +00:00
Deftera186 commented 2026-10-31 09:13:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-10-31T09:13:56Z.


What

v_div_scale_f64 read its three f64 operands with readF64Bits and never looked at FLOAT_MODE bits 7:6, the f16/f64 denormal field, while its f32 analogue v_div_scale_f32 reads its sources through readOperand(..., IrType::F32) and so flushes f32 denormal inputs by the f32 field. The f64 form kept a denormal input and result in every mode. With value 0x0000000000000001 and denominator and numerator 0x3ff0000000000000, in f64 denormal mode 0 the hardware returns 0x0000000000000000 and the recompiler returned 0x0000000000000001; with value 1.0 and a denormal denominator, mode 0 returns the default NaN 0xfff8000000000000 where the recompiler returned the scaled result.

vDivScaleF64 now flushes the value, denominator and numerator through flushF64Bits(..., 0x40u) and the final result through flushF64Bits(..., 0x80u). A flushed denominator or numerator becomes a signed zero, so the existing zero rule returns the default NaN; a denormal result is flushed to a zero of its sign when bit 1 of the field is clear. The VCC path and the NaN quieting are unchanged; shaders without a known float mode keep today's lowering, because flushF64Bits returns early when floatMode is absent. writeF64Result (clamp/omod) is untouched.

One set of hardware rows is left as technical debt rather than fixed here: gfx1101 returns an infinity where this helper scales the value operand by 2^-128 and the FPLdexp64 lowering gives a subnormal or a signed zero. That difference appears in every denormal mode, including the keep-both mode on current main, so it is a scale-model gap independent of the denormal field, out of scope for this change.

Sources:

  • v_div_scale_f32 in FloatInstructions.cpp (the f32 sibling, read through readOperand(IrType::F32)), and the existing flushF64Bits/float64Unary/float64Operation f64 flush helpers that follow bit 0 (input) and bit 1 (result) of the field.
  • docs/dev/debt/shader.md: the v_div_scale_f32 and v_div_fixup_f32 entry records the matching f32 rule measured on RDNA2.
  • Hardware measurements on gfx1101 with the hardware oracle, below.

Tested

Gentoo Linux, RX 7700 XT (gfx1101), RADV (Mesa 26.2.4).

Measured on RDNA3 (gfx1101, Radeon RX 7700 XT) with tools/hw-oracle; not measured on the PS5's gfx1013 or on RDNA2. All tables use f32 denormals kept, round to nearest even, DX10_CLAMP=1; FLOAT_MODE byte 0x30 | (field << 6) (mode 0 = 0x30, 1 = 0x70, 2 = 0xb0, 3 = 0xf0); IEEE 0 and 1 give identical results for every row.

  • New execution test F64DivScaleDenormalModes.cpp (ctest agc_driver_f64_div_scale_denormal_modes): 11 operand pairs, each run as v_div_scale_f64(value, denom, num) and v_div_scale_f64(value, value, num), with the result and the VCC written out, over the 9 modes (both IEEE settings, all four fields, and a "without a known float mode" row), with the Float64 capability skip and the device-dependent skip for devices that flush f64 denormals without float64DenormPreserve.
  • Red (fix reverted, test present): v_div_scale_f64 f64 denormal mode 0, IEEE mode on of div_scale(value, denom, num) with 0x0000000000000001 and 0x3ff0000000000000 is 0x0000000000000001, expected 0x0000000000000000; 46 of the 88 result slots differ. Green (fix): passes.
  • Paired validation-layer runs, same build dir, regex agc_driver_f64_div_scale_denormal_modes|agc_driver_f64_division$|agc_driver_f64_division_modifiers|agc_driver_division_output_modifiers|agc_driver_div_fixup_f64_denormal_modes|agc_driver_f64_add_mul_denormal_modes:
    • State A (fix reverted, test present): only agc_driver_f64_div_scale_denormal_modes fails, the other 5 pass; layer inserted 6, missing-layer line 0, VUID 0.
    • State B (fix): 6/6 pass; layer inserted 6, missing-layer line 0, VUID 0 (B does not exceed A).
  • lavapipe (Ubuntu 24.04 container, gcc 13, Release): all 6 pass on llvmpipe (LLVM 20.1.2, 256 bits); agc_driver_div_fixup_f64_denormal_modes 0.23s, agc_driver_division_output_modifiers 0.15s, agc_driver_f64_add_mul_denormal_modes 0.24s, agc_driver_f64_div_scale_denormal_modes 0.34s, agc_driver_f64_division 0.17s, agc_driver_f64_division_modifiers 0.20s.
  • Hardware model vs the fixed recompiler over the full sweep (8 register permutations of two f64 inputs feeding the three operand slots, 1424 pairs per mode, IEEE 0/1 x field 0..3 = 91,136 oracle rows): 0 VCC mismatches and 0 NaN-bit-only differences; unfixed main has 13072 value mismatches over the same sweep. All 1628 remaining value differences are the scale-model gap above, where gfx1101 returns an infinity. 1624 of them are bit-identical on main in every mode, including keep-both. The other 4 (value 0x85ad81d79a575555 with denominator and numerator -max-normal, modes 0 and 1) are a subnormal on main that the new result flush turns into a signed zero, so their bits differ from main while the hardware's -inf is missed either way. None of the 1628 was correct on main.

Hardware results, v_div_scale_f64(value, denom, num) (form 0) and v_div_scale_f64(value, value, num) (form 1), VCC in braces:

value denom/num field 0 form0 field 1 form0 field 2 form0 field 3 form0 field 0 form1 field 1 form1 field 2 form1 field 3 form1
0x0000000000000001 0x3ff0000000000000 0x0000000000000000 {0} 0x0000000000000000 {0} 0x0000000000000000 {0} 0x0000000000000001 {0} 0xfff8000000000000 {1} 0x04d0000000000000 {1} 0xfff8000000000000 {1} 0x04d0000000000000 {1}
0x80000000e33e474a 0x3ff0000000000000 0x8000000000000000 {0} 0x8000000000000000 {0} 0x8000000000000000 {0} 0x80000000e33e474a {0} 0xfff8000000000000 {1} 0x86cc67c8e9400000 {1} 0xfff8000000000000 {1} 0x86cc67c8e9400000 {1}
0x3ff0000000000000 0x0000000000000001 0xfff8000000000000 {0} 0x47f0000000000000 {0} 0xfff8000000000000 {0} 0x47f0000000000000 {0} 0xfff8000000000000 {1} 0x3ff0000000000000 {1} 0xfff8000000000000 {1} 0x3ff0000000000000 {1}
0x000fffffffffffff 0x0010000000000000 0x0000000000000000 {0} 0x080ffffffffffffe {0} 0x0000000000000000 {0} 0x080ffffffffffffe {0} 0xfff8000000000000 {0} 0x080ffffffffffffe {0} 0xfff8000000000000 {0} 0x080ffffffffffffe {0}
0x0010000000000000 0x0000000000000001 0xfff8000000000000 {0} 0x0810000000000000 {0} 0xfff8000000000000 {0} 0x0810000000000000 {0} 0xfff8000000000000 {0} 0x0810000000000000 {0} 0xfff8000000000000 {0} 0x0810000000000000 {0}
0x3ff0000000000000 0x7ff8000000000000 0x37f0000000000000 {1} 0x37f0000000000000 {1} 0x37f0000000000000 {1} 0x37f0000000000000 {1} 0x47f0000000000000 {1} 0x47f0000000000000 {1} 0x47f0000000000000 {1} 0x47f0000000000000 {1}

GPUs tested: AMD Radeon RX 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux (kernel 7.2.11); llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 container with the Linux CI configuration.

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 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux (kernel 7.2.11); llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 container with the Linux CI configuration
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5096224143 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13846). Originally posted by [Deftera186](https://github.com/Deftera186) on 2026-10-31T09:13:56Z. --- ### What `v_div_scale_f64` read its three f64 operands with `readF64Bits` and never looked at FLOAT_MODE bits 7:6, the f16/f64 denormal field, while its f32 analogue `v_div_scale_f32` reads its sources through `readOperand(..., IrType::F32)` and so flushes f32 denormal inputs by the f32 field. The f64 form kept a denormal input and result in every mode. With value `0x0000000000000001` and denominator and numerator `0x3ff0000000000000`, in f64 denormal mode 0 the hardware returns `0x0000000000000000` and the recompiler returned `0x0000000000000001`; with value `1.0` and a denormal denominator, mode 0 returns the default NaN `0xfff8000000000000` where the recompiler returned the scaled result. `vDivScaleF64` now flushes the value, denominator and numerator through `flushF64Bits(..., 0x40u)` and the final result through `flushF64Bits(..., 0x80u)`. A flushed denominator or numerator becomes a signed zero, so the existing zero rule returns the default NaN; a denormal result is flushed to a zero of its sign when bit 1 of the field is clear. The VCC path and the NaN quieting are unchanged; shaders without a known float mode keep today's lowering, because `flushF64Bits` returns early when `floatMode` is absent. `writeF64Result` (clamp/omod) is untouched. One set of hardware rows is left as technical debt rather than fixed here: gfx1101 returns an infinity where this helper scales the value operand by 2^-128 and the `FPLdexp64` lowering gives a subnormal or a signed zero. That difference appears in every denormal mode, including the keep-both mode on current `main`, so it is a scale-model gap independent of the denormal field, out of scope for this change. Sources: - `v_div_scale_f32` in `FloatInstructions.cpp` (the f32 sibling, read through `readOperand(IrType::F32)`), and the existing `flushF64Bits`/`float64Unary`/`float64Operation` f64 flush helpers that follow bit 0 (input) and bit 1 (result) of the field. - `docs/dev/debt/shader.md`: the `v_div_scale_f32 and v_div_fixup_f32` entry records the matching f32 rule measured on RDNA2. - Hardware measurements on gfx1101 with the hardware oracle, below. ### Tested Gentoo Linux, RX 7700 XT (gfx1101), RADV (Mesa 26.2.4). Measured on RDNA3 (gfx1101, Radeon RX 7700 XT) with tools/hw-oracle; not measured on the PS5's gfx1013 or on RDNA2. All tables use f32 denormals kept, round to nearest even, DX10_CLAMP=1; FLOAT_MODE byte 0x30 | (field << 6) (mode 0 = 0x30, 1 = 0x70, 2 = 0xb0, 3 = 0xf0); IEEE 0 and 1 give identical results for every row. - New execution test `F64DivScaleDenormalModes.cpp` (ctest `agc_driver_f64_div_scale_denormal_modes`): 11 operand pairs, each run as `v_div_scale_f64(value, denom, num)` and `v_div_scale_f64(value, value, num)`, with the result and the VCC written out, over the 9 modes (both IEEE settings, all four fields, and a "without a known float mode" row), with the Float64 capability skip and the device-dependent skip for devices that flush f64 denormals without `float64DenormPreserve`. - Red (fix reverted, test present): `v_div_scale_f64 f64 denormal mode 0, IEEE mode on of div_scale(value, denom, num) with 0x0000000000000001 and 0x3ff0000000000000 is 0x0000000000000001, expected 0x0000000000000000`; 46 of the 88 result slots differ. Green (fix): passes. - Paired validation-layer runs, same build dir, regex `agc_driver_f64_div_scale_denormal_modes|agc_driver_f64_division$|agc_driver_f64_division_modifiers|agc_driver_division_output_modifiers|agc_driver_div_fixup_f64_denormal_modes|agc_driver_f64_add_mul_denormal_modes`: - State A (fix reverted, test present): only `agc_driver_f64_div_scale_denormal_modes` fails, the other 5 pass; layer inserted 6, missing-layer line 0, VUID 0. - State B (fix): 6/6 pass; layer inserted 6, missing-layer line 0, VUID 0 (B does not exceed A). - lavapipe (Ubuntu 24.04 container, gcc 13, Release): all 6 pass on `llvmpipe (LLVM 20.1.2, 256 bits)`; `agc_driver_div_fixup_f64_denormal_modes` 0.23s, `agc_driver_division_output_modifiers` 0.15s, `agc_driver_f64_add_mul_denormal_modes` 0.24s, `agc_driver_f64_div_scale_denormal_modes` 0.34s, `agc_driver_f64_division` 0.17s, `agc_driver_f64_division_modifiers` 0.20s. - Hardware model vs the fixed recompiler over the full sweep (8 register permutations of two f64 inputs feeding the three operand slots, 1424 pairs per mode, IEEE 0/1 x field 0..3 = 91,136 oracle rows): 0 VCC mismatches and 0 NaN-bit-only differences; unfixed `main` has 13072 value mismatches over the same sweep. All 1628 remaining value differences are the scale-model gap above, where gfx1101 returns an infinity. 1624 of them are bit-identical on `main` in every mode, including keep-both. The other 4 (value 0x85ad81d79a575555 with denominator and numerator -max-normal, modes 0 and 1) are a subnormal on `main` that the new result flush turns into a signed zero, so their bits differ from `main` while the hardware's -inf is missed either way. None of the 1628 was correct on `main`. Hardware results, `v_div_scale_f64(value, denom, num)` (form 0) and `v_div_scale_f64(value, value, num)` (form 1), VCC in braces: | value | denom/num | field 0 form0 | field 1 form0 | field 2 form0 | field 3 form0 | field 0 form1 | field 1 form1 | field 2 form1 | field 3 form1 | |---|---|---|---|---|---|---|---|---|---| | 0x0000000000000001 | 0x3ff0000000000000 | 0x0000000000000000 {0} | 0x0000000000000000 {0} | 0x0000000000000000 {0} | 0x0000000000000001 {0} | 0xfff8000000000000 {1} | 0x04d0000000000000 {1} | 0xfff8000000000000 {1} | 0x04d0000000000000 {1} | | 0x80000000e33e474a | 0x3ff0000000000000 | 0x8000000000000000 {0} | 0x8000000000000000 {0} | 0x8000000000000000 {0} | 0x80000000e33e474a {0} | 0xfff8000000000000 {1} | 0x86cc67c8e9400000 {1} | 0xfff8000000000000 {1} | 0x86cc67c8e9400000 {1} | | 0x3ff0000000000000 | 0x0000000000000001 | 0xfff8000000000000 {0} | 0x47f0000000000000 {0} | 0xfff8000000000000 {0} | 0x47f0000000000000 {0} | 0xfff8000000000000 {1} | 0x3ff0000000000000 {1} | 0xfff8000000000000 {1} | 0x3ff0000000000000 {1} | | 0x000fffffffffffff | 0x0010000000000000 | 0x0000000000000000 {0} | 0x080ffffffffffffe {0} | 0x0000000000000000 {0} | 0x080ffffffffffffe {0} | 0xfff8000000000000 {0} | 0x080ffffffffffffe {0} | 0xfff8000000000000 {0} | 0x080ffffffffffffe {0} | | 0x0010000000000000 | 0x0000000000000001 | 0xfff8000000000000 {0} | 0x0810000000000000 {0} | 0xfff8000000000000 {0} | 0x0810000000000000 {0} | 0xfff8000000000000 {0} | 0x0810000000000000 {0} | 0xfff8000000000000 {0} | 0x0810000000000000 {0} | | 0x3ff0000000000000 | 0x7ff8000000000000 | 0x37f0000000000000 {1} | 0x37f0000000000000 {1} | 0x37f0000000000000 {1} | 0x37f0000000000000 {1} | 0x47f0000000000000 {1} | 0x47f0000000000000 {1} | 0x47f0000000000000 {1} | 0x47f0000000000000 {1} | GPUs tested: AMD Radeon RX 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux (kernel 7.2.11); llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 container with the Linux CI configuration. ### 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 7700 XT (gfx1101), RADV, Mesa 26.2.4, Gentoo Linux (kernel 7.2.11); llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04 container with the Linux CI configuration - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 09:19:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T09:19:21Z.

Review: COMMENTED


Reviewed — additional evidence needed

The implementation and test logic look internally consistent, but the supplied hardware results are from RDNA3 and do not confirm this denormal behavior on the PS5’s RDNA2-class GPU.

What I ran

Reviewed head 3754726cff4cee939ab556ba8b883436f1618685. GitHub reports PR base 809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab; I also checked against the newer current main tip c5e389a12647ae98b21b55dc522ab4d6d3d0943b, where the merge preview was clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was invoked.

git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-13846
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-13846 --title 'fix(shader): flush v_div_scale_f64 denormals by the f64 denormal field' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/pr-body.md
git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-13846
python3 tools/pr_stack_check.py 13846 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/stack-current
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13846 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceAgcDriver/tests/execution/F64DivScaleDenormalModes.cpp

Results

Check Result
git diff --check against current main Passed; no output.
Conventions and PR template Passed against current main.
Merge preview / dependency check Clean against current main; no declared dependency found.
C++ test registration Confirmed by source inspection: execution tests are discovered with CMake file(GLOB ... CONFIGURE_DEPENDS ...). The heuristic warning that this test might be unregistered is a false positive.
No-build precheck Partial: diff, conventions, and live mergeability passed; the isolated checkout lacks the local-only pr_abi_audit.py and pr_test_quality.py helpers. ABI auditing does not apply to these changed paths.
Local build and focused C++ test Not run; both require building, which is excluded from initial review.
Hosted CI snapshot Eligibility, conventions, portability, intake, labels, report, and relinker ASan passed. Linux product job was skipped; Windows and Linux relinker jobs were in progress and macOS relinker jobs were queued at the latest snapshot.
Selected unedited command output

check_conventions.py:

All conventions checks passed.

git merge-tree:

529504c44fda4f0b3f2e2479a10ed1e8e460de87

Precheck helper errors:

/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/head-3754726cff4c-f7fada9f/tools/pr_abi_audit.py': [Errno 2] No such file or directory
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/head-3754726cff4c-f7fada9f/tools/pr_test_quality.py': [Errno 2] No such file or directory

Negative control

Assertion Mutation Result
The new cases distinguish the previous lowering from the proposed flush behavior. Author reports reverting the fix while retaining the test. Author-reported failure; I did not independently build or run the test.

Findings

Blocking

No source-code defect was confirmed. I am withholding approval because this change encodes GPU floating-point denormal behavior, while the supplied hardware measurements are from gfx1101/RDNA3 and the author explicitly reports no measurement on gfx1013/RDNA2.

Non-blocking

The implementation routes input and result words through the existing f64 flush helper, and the added test covers the four denormal modes, both IEEE settings, VCC, and unknown float mode. Please add a focused RDNA2 result or pinned evidence that establishes these v_div_scale_f64 denormal rules on that generation; the current RDNA3 and lavapipe results do not establish PS5-specific behavior.

Sources

Not verified

  • No local build, CTest run, or independent negative control.
  • No PS5, gfx1013, or other RDNA2 hardware run was available; the hardware and lavapipe results above are reported by the PR author.
  • Hosted Windows was still running and hosted macOS relinker jobs were queued in the latest snapshot.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722135996 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13846#pullrequestreview-5722135996). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T09:19:21Z. **Review:** COMMENTED --- # Reviewed — additional evidence needed The implementation and test logic look internally consistent, but the supplied hardware results are from RDNA3 and do not confirm this denormal behavior on the PS5’s RDNA2-class GPU. ## What I ran Reviewed head `3754726cff4cee939ab556ba8b883436f1618685`. GitHub reports PR base `809c7fa2dfb1b21e2b31b3114b7d51bc14ee88ab`; I also checked against the newer current `main` tip `c5e389a12647ae98b21b55dc522ab4d6d3d0943b`, where the merge preview was clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was invoked. ```sh git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-13846 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-13846 --title 'fix(shader): flush v_div_scale_f64 denormals by the f64 denormal field' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/pr-body.md git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-13846 python3 tools/pr_stack_check.py 13846 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/stack-current python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13846 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846 python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libSceAgcDriver/tests/execution/F64DivScaleDenormalModes.cpp ``` ## Results | Check | Result | |---|---| | `git diff --check` against current `main` | Passed; no output. | | Conventions and PR template | Passed against current `main`. | | Merge preview / dependency check | Clean against current `main`; no declared dependency found. | | C++ test registration | Confirmed by source inspection: execution tests are discovered with CMake `file(GLOB ... CONFIGURE_DEPENDS ...)`. The heuristic warning that this test might be unregistered is a false positive. | | No-build precheck | Partial: diff, conventions, and live mergeability passed; the isolated checkout lacks the local-only `pr_abi_audit.py` and `pr_test_quality.py` helpers. ABI auditing does not apply to these changed paths. | | Local build and focused C++ test | Not run; both require building, which is excluded from initial review. | | Hosted CI snapshot | Eligibility, conventions, portability, intake, labels, report, and relinker ASan passed. Linux product job was skipped; Windows and Linux relinker jobs were in progress and macOS relinker jobs were queued at the latest snapshot. | <details><summary>Selected unedited command output</summary> `check_conventions.py`: ```text All conventions checks passed. ``` `git merge-tree`: ```text 529504c44fda4f0b3f2e2479a10ed1e8e460de87 ``` Precheck helper errors: ```text /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/head-3754726cff4c-f7fada9f/tools/pr_abi_audit.py': [Errno 2] No such file or directory /usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13846/head-3754726cff4c-f7fada9f/tools/pr_test_quality.py': [Errno 2] No such file or directory ``` </details> ## Negative control | Assertion | Mutation | Result | |---|---|---| | The new cases distinguish the previous lowering from the proposed flush behavior. | Author reports reverting the fix while retaining the test. | Author-reported failure; I did not independently build or run the test. | ## Findings ### Blocking No source-code defect was confirmed. I am withholding approval because this change encodes GPU floating-point denormal behavior, while the supplied hardware measurements are from gfx1101/RDNA3 and the author explicitly reports no measurement on gfx1013/RDNA2. ### Non-blocking The implementation routes input and result words through the existing f64 flush helper, and the added test covers the four denormal modes, both IEEE settings, VCC, and unknown float mode. Please add a focused RDNA2 result or pinned evidence that establishes these `v_div_scale_f64` denormal rules on that generation; the current RDNA3 and lavapipe results do not establish PS5-specific behavior. ## Sources - [Changed `vDivScaleF64` implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3754726cff4cee939ab556ba8b883436f1618685/core/shader/recompiler/Translation/src/Float64Instructions.cpp) - [Existing `flushF64Bits` helper at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3754726cff4cee939ab556ba8b883436f1618685/core/shader/recompiler/Translation/src/TranslationContext/SubwordPacking.cpp) - [Added denormal-mode execution test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/3754726cff4cee939ab556ba8b883436f1618685/core/libs/prx/libSceAgcDriver/tests/execution/F64DivScaleDenormalModes.cpp) - [Execution-test CMake registration at the checked current base](https://github.com/boykopovar/AnyPS5/blob/c5e389a12647ae98b21b55dc522ab4d6d3d0943b/core/libs/prx/libSceAgcDriver/CMakeLists.txt) ## Not verified - No local build, CTest run, or independent negative control. - No PS5, gfx1013, or other RDNA2 hardware run was available; the hardware and lavapipe results above are reported by the PR author. - Hosted Windows was still running and hosted macOS relinker jobs were queued in the latest snapshot.
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!13846
No description provided.