fix(shader): flush a tiny v_cvt_f32_f64 result by the f32 denormal field #18487

Merged
angrysandhill merged 2 commits from upstream-pr/18487 into main 2026-11-16 06:06:11 +00:00
angrysandhill commented 2026-11-11 18:25:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by angrysandhill on 2026-11-11T18:25:01Z.


What

Measured on RDNA2 (gfx1031, RX 6750 XT; the PS5's gfx1013 is not measured): with bit 1 of the FLOAT_MODE f32 denormal field clear (fields 0 and 1), v_cvt_f32_f64 gives a zero of the source's sign when the f64 source, rounded to 24 significant bits with an unbounded exponent in the f32 round mode, is below 2^-126. This is the tininess rule the f32 products already follow. So 0x380fffffe0000000, whose conversion rounds up to 0x00800000, gives 0, while 0x380ffffff0000000 gives 0x00800000.

The translation flushed nothing. Field 1 kept f32 denormals on every host, and field 0, the 0xc0 titles use, kept them on hosts that do not use the hardware f32 flush. The v_cvt_f32_f64 f32-denormal debt entry recorded this gap from gfx1101, and on #13847 oneandonlydean noted that "the separate conversion-denormal fix can remain a follow-up".

The change:

  • float64Operation: for ConvertF32F64, with a known float mode and bit 1 clear, compares the f64 source bits (after neg and abs) with the limit for the round mode and selects the zero of the source's sign. The compares are integer compares on the two halves, so they also cover the integer lowering of devices without Float64 (#13341).
  • Why not f32DenormalFlushFor, as the debt entry suggested: a flush of the f32 result keeps 0x00800000 for the sources that round up to it, where RDNA2 gives 0.
  • Shaders without a known float mode keep the plain conversion, as the instruction's output modifier does since #13847.
  • RoundingUseOf: the conversion now reads bit 1 of the f32 denormal field, so it declares it (denorm32Out). Where that bit differs between the paths reaching the conversion, or comes from an SGPR, translation now refuses instead of guessing.
  • Debt entry: cut to what is still open. The conversion rounds to nearest even whatever the f32 round mode, which these measurements found, and gfx1013 is not measured.

Tested

Setup: Windows 10 Home 22H2 (10.0.19045), AMD Radeon RX 6750 XT (gfx1031), AMD Software Adrenalin 26.10.1 (driver 32.0.21045.16010), WinLibs GCC 15.2.0 r7 UCRT, Release, BUILD_TESTING=ON. Everything below was run on main f57c971559 and on this branch, which is based on it. This device uses the hardware f32 flush; APS5_NO_HW_F32_FLUSH=1 turns it off.

RDNA2 measurement (hardware oracle, HIP runtime), compared row by row with the recompiler through HW_ORACLE_RUNTIME=vulkan.

  • Rows: 32 f64 sources. They cover the band just below 2^-126 on both sides of the 24-bit rounding limit (0x380fffffb0000000 to 0x380fffffffffffff, both signs), sources that convert to f32 denormals, 2^-150 and 1.5 × 2^-150, f64 denormals, ±0, 2^-126, 1, the largest finite f32, and infinities and NaNs.
  • Forms: plain, clamp, mul:2 and div:2.
  • Modes: IEEE 0 and 1, each with the f32 denormal field at 0 to 3, rounding to nearest even. Also f32 rounding up, down and toward zero with the field at 0, 1 and 3, IEEE 0. DX10_CLAMP 1, f16/f64 denormals kept.

Rows differing from RDNA2:

main this PR
Round to nearest, 8 modes 30 of 256 (field 1, 15 at each IEEE setting) 0
Same, with APS5_NO_HW_F32_FLUSH=1 60 of 256 (fields 0 and 1) 0
Directed rounding, 9 modes 91 of 288 32
Same, with APS5_NO_HW_F32_FLUSH=1 132 of 288 30
  • The rule: it predicts all 320 measured plain results with field 0 or 1, in all four round modes and at both IEEE settings.
  • Every row that still differs also differs on main. Three causes, none in this change:
    • The conversion rounds to nearest even whatever the f32 round mode: with the field at 3 it differs on 5, 10 and 11 of 32 sources when rounding up, down and toward zero.
    • With the hardware flush, field 0 and rounding up, the host's own flush applies the round-to-nearest limit to two sources.
    • mul:2 of the largest finite f32 under rounding down or toward zero gives infinity where RDNA2 gives 0x7f7fffff. That is the output modifier, not the conversion.
  • Output modifiers on the flushed zero: clamp, mul:2 and div:2 of a flushed negative source give +0, as on RDNA2, through the existing f32 result path.

Tests:

  • New agc_driver_cvt_f32_f64_denormal_result: 32 sources through 8 forms (plain, clamp, mul:2, div:2, mul:4, -src, |src|, -src with clamp), with FLOAT_MODE 0xc0, 0xd0, 0xe0 and 0xf0 (f32 denormal field 0 to 3) at IEEE 0 and 1, rounding to nearest. Since d9888e1c5f also FLOAT_MODE 0xd1, 0xd2 and 0xd3 (field 1 rounding up, down and toward zero, IEEE 0), where the flush limit depends on the round mode. The expected values are RDNA2's.
    • Runs: always with the emulated flush, and where Target() uses it, with the hardware flush. On a device without DenormPreserve 32 it leaves out the expected values that are f32 denormals (fields 2 and 3), and the last line says how many.
    • On main with only this test file added it fails in its emulated-flush pass, which runs on every device: v_cvt_f32_f64 denormal result: emulated flush FLOAT_MODE 0x000000c0 IEEE=0 lane 0 v_cvt_f32_f64 v10, v[4:5] of 0x3800000000000000 is 0x00400000, expected 0x00000000. With APS5_NO_HW_F32_FLUSH=1 (the recompiler is told this device has no hardware flush) it fails with the same message.
    • With this change it passes: both flush passes run here, and one with APS5_NO_HW_F32_FLUSH=1.
    • Directed modes: two cases are left out there. Every form of 0x381ffffff0000000, a normal source that needs rounding, is left out because the conversion itself still rounds to nearest (the debt entry). mul:2 and mul:4 of the largest finite f32 are left out too: the output modifier overflows them under rounding down and toward zero (see above).
      • Pass: at d9888e1c5f the test passes both flush passes under the validation layer, with no VUID- line.
      • Pinned: removing the round-up/down branch of the flush (rounding == 1u || rounding == 2u) fails it: emulated flush FLOAT_MODE 0x000000d1 IEEE=0 lane 8 v_cvt_f32_f64 v10, v[4:5] of 0x380fffffe8000000 is 0x00000000, expected 0x00800000. The version of the test before d9888e1c5f still passes without that branch.
      • Toward zero: giving it the round-to-nearest limit fails it at 0xd3, lane 10.
      • Field 0: the directed modes are not run there, because with the hardware flush the host applies the round-to-nearest limit to two sources (see above).
    • Not run on any other host.
  • Full ^(agc_|shader|vector_), 4 at a time: 1,647 tests: 1,628 passed, 18 skipped, 1 failed.
    • Against main: the same run on main (1,646 tests) gives every test the same outcome. The only extra test is the new one, which passes.
    • The failure: agc_driver_sample_order_grid_reference fails on main too, with the same message ("the exact path did not render the checkerboard bit for bit like the reference"). It is the odd-row failure that #18229 reports on an RX 6700 XT; #9503 addresses it (not run here).
  • Validation layer (1.4.367): the 82 tests matching -R "^(agc_driver_(cvt_|f64_|f32_|nan_|division|div_).*|agc_driver_.*(denormal|_nan|rounding).*|vector_half_double_output_modifiers)$" (81 on main, which lacks the new one), one at a time with ctest -V, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1.
    • Layer: no log has was not found but was requested by env var VK_INSTANCE_LAYERS. Every test that opens a device logs the layer insertion; agc_driver_f64_denorm_preserve_spirv and vector_half_double_output_modifiers check only SPIR-V or IR and open none.
    • Result: no VUID- line on either side.
    • Skipped: agc_driver_float16_unused_nan_payloads skips on both sides, because this device has no native f16 conversions with RTE rounding and kept f16 denormals.

Not measured: the PS5's gfx1013, and hosts other than this one.

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 6750 XT (gfx1031), AMD Software Adrenalin 26.10.1 (32.0.21045.16010), Windows 10 22H2
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5264718963 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18487). Originally posted by [angrysandhill](https://github.com/angrysandhill) on 2026-11-11T18:25:01Z. --- ### What Measured on RDNA2 (gfx1031, RX 6750 XT; the PS5's gfx1013 is not measured): with bit 1 of the `FLOAT_MODE` f32 denormal field clear (fields 0 and 1), `v_cvt_f32_f64` gives a zero of the source's sign when the f64 source, rounded to 24 significant bits with an unbounded exponent in the f32 round mode, is below 2^-126. This is the tininess rule the f32 products already follow. So `0x380fffffe0000000`, whose conversion rounds up to `0x00800000`, gives `0`, while `0x380ffffff0000000` gives `0x00800000`. The translation flushed nothing. Field 1 kept f32 denormals on every host, and field 0, the `0xc0` titles use, kept them on hosts that do not use the hardware f32 flush. The `v_cvt_f32_f64` f32-denormal debt entry recorded this gap from gfx1101, and on #13847 oneandonlydean noted that "the separate conversion-denormal fix can remain a follow-up". The change: - **`float64Operation`:** for `ConvertF32F64`, with a known float mode and bit 1 clear, compares the f64 source bits (after `neg` and `abs`) with the limit for the round mode and selects the zero of the source's sign. The compares are integer compares on the two halves, so they also cover the integer lowering of devices without Float64 (#13341). - **Why not `f32DenormalFlushFor`, as the debt entry suggested:** a flush of the f32 result keeps `0x00800000` for the sources that round up to it, where RDNA2 gives 0. - **Shaders without a known float mode** keep the plain conversion, as the instruction's output modifier does since #13847. - **`RoundingUseOf`:** the conversion now reads bit 1 of the f32 denormal field, so it declares it (`denorm32Out`). Where that bit differs between the paths reaching the conversion, or comes from an SGPR, translation now refuses instead of guessing. - **Debt entry:** cut to what is still open. The conversion rounds to nearest even whatever the f32 round mode, which these measurements found, and gfx1013 is not measured. ### Tested **Setup:** Windows 10 Home 22H2 (10.0.19045), AMD Radeon RX 6750 XT (gfx1031), AMD Software Adrenalin 26.10.1 (driver 32.0.21045.16010), WinLibs GCC 15.2.0 r7 UCRT, Release, `BUILD_TESTING=ON`. Everything below was run on `main` `f57c971559` and on this branch, which is based on it. This device uses the hardware f32 flush; `APS5_NO_HW_F32_FLUSH=1` turns it off. **RDNA2 measurement** ([hardware oracle](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/HW_ORACLE.md), HIP runtime), compared row by row with the recompiler through `HW_ORACLE_RUNTIME=vulkan`. - **Rows:** 32 f64 sources. They cover the band just below 2^-126 on both sides of the 24-bit rounding limit (`0x380fffffb0000000` to `0x380fffffffffffff`, both signs), sources that convert to f32 denormals, 2^-150 and 1.5 × 2^-150, f64 denormals, ±0, 2^-126, 1, the largest finite f32, and infinities and NaNs. - **Forms:** plain, `clamp`, `mul:2` and `div:2`. - **Modes:** IEEE 0 and 1, each with the f32 denormal field at 0 to 3, rounding to nearest even. Also f32 rounding up, down and toward zero with the field at 0, 1 and 3, IEEE 0. DX10_CLAMP 1, f16/f64 denormals kept. Rows differing from RDNA2: | | `main` | this PR | |---|---|---| | Round to nearest, 8 modes | 30 of 256 (field 1, 15 at each IEEE setting) | 0 | | Same, with `APS5_NO_HW_F32_FLUSH=1` | 60 of 256 (fields 0 and 1) | 0 | | Directed rounding, 9 modes | 91 of 288 | 32 | | Same, with `APS5_NO_HW_F32_FLUSH=1` | 132 of 288 | 30 | - **The rule:** it predicts all 320 measured plain results with field 0 or 1, in all four round modes and at both IEEE settings. - **Every row that still differs also differs on `main`.** Three causes, none in this change: - The conversion rounds to nearest even whatever the f32 round mode: with the field at 3 it differs on 5, 10 and 11 of 32 sources when rounding up, down and toward zero. - With the hardware flush, field 0 and rounding up, the host's own flush applies the round-to-nearest limit to two sources. - `mul:2` of the largest finite f32 under rounding down or toward zero gives infinity where RDNA2 gives `0x7f7fffff`. That is the output modifier, not the conversion. - **Output modifiers on the flushed zero:** `clamp`, `mul:2` and `div:2` of a flushed negative source give `+0`, as on RDNA2, through the existing f32 result path. **Tests:** - **New `agc_driver_cvt_f32_f64_denormal_result`:** 32 sources through 8 forms (plain, `clamp`, `mul:2`, `div:2`, `mul:4`, `-src`, `|src|`, `-src` with `clamp`), with FLOAT_MODE `0xc0`, `0xd0`, `0xe0` and `0xf0` (f32 denormal field 0 to 3) at IEEE 0 and 1, rounding to nearest. Since `d9888e1c5f` also FLOAT_MODE `0xd1`, `0xd2` and `0xd3` (field 1 rounding up, down and toward zero, IEEE 0), where the flush limit depends on the round mode. The expected values are RDNA2's. - **Runs:** always with the emulated flush, and where `Target()` uses it, with the hardware flush. On a device without `DenormPreserve 32` it leaves out the expected values that are f32 denormals (fields 2 and 3), and the last line says how many. - **On `main` with only this test file added** it fails in its emulated-flush pass, which runs on every device: `v_cvt_f32_f64 denormal result: emulated flush FLOAT_MODE 0x000000c0 IEEE=0 lane 0 v_cvt_f32_f64 v10, v[4:5] of 0x3800000000000000 is 0x00400000, expected 0x00000000`. With `APS5_NO_HW_F32_FLUSH=1` (the recompiler is told this device has no hardware flush) it fails with the same message. - **With this change** it passes: both flush passes run here, and one with `APS5_NO_HW_F32_FLUSH=1`. - **Directed modes:** two cases are left out there. Every form of `0x381ffffff0000000`, a normal source that needs rounding, is left out because the conversion itself still rounds to nearest (the debt entry). `mul:2` and `mul:4` of the largest finite f32 are left out too: the output modifier overflows them under rounding down and toward zero (see above). - **Pass:** at `d9888e1c5f` the test passes both flush passes under the validation layer, with no `VUID-` line. - **Pinned:** removing the round-up/down branch of the flush (`rounding == 1u || rounding == 2u`) fails it: `emulated flush FLOAT_MODE 0x000000d1 IEEE=0 lane 8 v_cvt_f32_f64 v10, v[4:5] of 0x380fffffe8000000 is 0x00000000, expected 0x00800000`. The version of the test before `d9888e1c5f` still passes without that branch. - **Toward zero:** giving it the round-to-nearest limit fails it at `0xd3`, lane 10. - **Field 0:** the directed modes are not run there, because with the hardware flush the host applies the round-to-nearest limit to two sources (see above). - **Not run** on any other host. - **Full `^(agc_|shader|vector_)`, 4 at a time:** 1,647 tests: 1,628 passed, 18 skipped, 1 failed. - **Against `main`:** the same run on `main` (1,646 tests) gives every test the same outcome. The only extra test is the new one, which passes. - **The failure:** `agc_driver_sample_order_grid_reference` fails on `main` too, with the same message ("the exact path did not render the checkerboard bit for bit like the reference"). It is the odd-row failure that #18229 reports on an RX 6700 XT; #9503 addresses it (not run here). - **Validation layer** (1.4.367): the 82 tests matching `-R "^(agc_driver_(cvt_|f64_|f32_|nan_|division|div_).*|agc_driver_.*(denormal|_nan|rounding).*|vector_half_double_output_modifiers)$"` (81 on `main`, which lacks the new one), one at a time with `ctest -V`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`. - **Layer:** no log has `was not found but was requested by env var VK_INSTANCE_LAYERS`. Every test that opens a device logs the layer insertion; `agc_driver_f64_denorm_preserve_spirv` and `vector_half_double_output_modifiers` check only SPIR-V or IR and open none. - **Result:** no `VUID-` line on either side. - **Skipped:** `agc_driver_float16_unused_nan_payloads` skips on both sides, because this device has no native f16 conversions with RTE rounding and kept f16 denormals. **Not measured:** the PS5's gfx1013, and hosts other than this one. ### Checklist - [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 6750 XT (gfx1031), AMD Software Adrenalin 26.10.1 (32.0.21045.16010), Windows 10 22H2 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-12 14:27:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T14:27:49Z.

Review: COMMENTED


Reviewed — no blocking findings

I read the four changed files through their diff and the head functions they call, and found no concrete defect; nothing was built or run here.

What I ran

  • Head d94daee70c84f8b936108d5ced9299393514a3e8, base main. Read-only review; no build, no test run.
  • Reader calls at head (repo_read.py): search readF64Bits, search denorm32Out, search ULessThan, search SelectF32, search RoundingUseKind, search setsDirectedRounding, search GLOB_RECURSE, search tests/execution, cat SubwordPacking.cpp 36 60, cat RoundingMode.cpp 30 50, cat RoundingMode.cpp 360 413.
  • Checked by hand: the 24-bit rounding thresholds 0x380ffffff0000000 (tie, rounds up to 2^-126, not flushed), 0x380fffffe0000000 (flushed) and the directed cases against below(0x380fffffe0000001) and below(0x3810000000000000).

Results

Check Result Note
Build and compile not run house rule: no builds in this review
Execution tests (author's runs) not run author-reported only
Threshold arithmetic, by hand passed agrees with the new test's expected values for the nearest-even rows
Neg and abs before the compare passed readF64Bits applies both (SubwordPacking.cpp:36-53)
Refusal on run-time rounding change passed unknown bits throw (RoundingMode.cpp:395-397)
Execution test registration passed tests/execution/*.cpp is globbed (CMakeLists.txt:691-702)

Findings

Blocking

None.

Non-blocking

  • Directed rounding flush has no test. Float64Instructions.cpp:48 gates the directed branch (rounding == 1u || rounding == 2u, with the toward-zero case in lines 47-51). CvtF32F64DenormalResult.cpp runs only the nearest-even modes (0xc0, 0xd0, 0xe0, 0xf0, rounding bits 0), so lines 47-51 have no regression test in the tree. The PR says directed rounding is left out on purpose; the directed flush rule itself is only in the PR's measurements, not in a pinned test.

Sources

Not verified

  • Compilation of the new code. ULessThan, SelectF32 and BitCastF32 exist in the tree; LogicalOr, LogicalAnd, LogicalNot, IEqual and INotEqual were not checked.
  • The expected values in CvtF32F64DenormalResult.cpp are RDNA2 measurements from the author. I did not check them against hardware.
  • The author's suite run (1,647 tests: 1,628 passed, 18 skipped, 1 failed) and the validation-layer run are author-reported and not run here.
  • The directed-rounding numbers in the PR body and the debt entry at docs/dev/debt/shader.md:197 are author measurements; no test in the tree pins them.
  • The PS5's gfx1013 is not measured, as the PR states.
  • Files read: the four reviewed files, through their diff hunks and the head functions above. I did not open their full text in files/. Files excluded by rule: none.

To get this to a good state

  • Add a regression test for the directed branch (Float64Instructions.cpp:47-51) or mark it unpinned in the debt entry.
  • Point the PR body's HW_ORACLE.md link at the head SHA instead of main.
  • Rerun agc_driver_cvt_f32_f64_denormal_result and the ^(agc_|shader|vector_) set on the new head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5876125808 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18487#pullrequestreview-5876125808). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T14:27:49Z. **Review:** COMMENTED --- # Reviewed — no blocking findings I read the four changed files through their diff and the head functions they call, and found no concrete defect; nothing was built or run here. **What I ran** - Head `d94daee70c84f8b936108d5ced9299393514a3e8`, base `main`. Read-only review; no build, no test run. - Reader calls at head (`repo_read.py`): `search readF64Bits`, `search denorm32Out`, `search ULessThan`, `search SelectF32`, `search RoundingUseKind`, `search setsDirectedRounding`, `search GLOB_RECURSE`, `search tests/execution`, `cat SubwordPacking.cpp 36 60`, `cat RoundingMode.cpp 30 50`, `cat RoundingMode.cpp 360 413`. - Checked by hand: the 24-bit rounding thresholds `0x380ffffff0000000` (tie, rounds up to `2^-126`, not flushed), `0x380fffffe0000000` (flushed) and the directed cases against `below(0x380fffffe0000001)` and `below(0x3810000000000000)`. **Results** | Check | Result | Note | |---|---|---| | Build and compile | not run | house rule: no builds in this review | | Execution tests (author's runs) | not run | author-reported only | | Threshold arithmetic, by hand | passed | agrees with the new test's expected values for the nearest-even rows | | Neg and abs before the compare | passed | `readF64Bits` applies both (SubwordPacking.cpp:36-53) | | Refusal on run-time rounding change | passed | unknown bits throw (RoundingMode.cpp:395-397) | | Execution test registration | passed | `tests/execution/*.cpp` is globbed (CMakeLists.txt:691-702) | **Findings** **Blocking** None. **Non-blocking** - **Directed rounding flush has no test.** `Float64Instructions.cpp:48` gates the directed branch (`rounding == 1u || rounding == 2u`, with the toward-zero case in lines 47-51). `CvtF32F64DenormalResult.cpp` runs only the nearest-even modes (`0xc0`, `0xd0`, `0xe0`, `0xf0`, rounding bits 0), so lines 47-51 have no regression test in the tree. The PR says directed rounding is left out on purpose; the directed flush rule itself is only in the PR's measurements, not in a pinned test. **Sources** - Neg and abs applied in `readF64Bits`: https://github.com/boykopovar/AnyPS5/blob/d94daee70c84f8b936108d5ced9299393514a3e8/core/shader/recompiler/Translation/src/TranslationContext/SubwordPacking.cpp#L36-L53 - New flush block: https://github.com/boykopovar/AnyPS5/blob/d94daee70c84f8b936108d5ced9299393514a3e8/core/shader/recompiler/Translation/src/Float64Instructions.cpp#L39-L54 - Refusal on unknown bits: https://github.com/boykopovar/AnyPS5/blob/d94daee70c84f8b936108d5ced9299393514a3e8/core/shader/recompiler/Translation/src/RoundingMode.cpp#L395-L411 - Directed-change check: https://github.com/boykopovar/AnyPS5/blob/d94daee70c84f8b936108d5ced9299393514a3e8/core/shader/recompiler/Translation/src/RoundingMode.cpp#L36-L42 - Execution tests globbed: https://github.com/boykopovar/AnyPS5/blob/d94daee70c84f8b936108d5ced9299393514a3e8/core/libs/prx/libSceAgcDriver/CMakeLists.txt#L691-L702 **Not verified** - Compilation of the new code. `ULessThan`, `SelectF32` and `BitCastF32` exist in the tree; `LogicalOr`, `LogicalAnd`, `LogicalNot`, `IEqual` and `INotEqual` were not checked. - The expected values in `CvtF32F64DenormalResult.cpp` are RDNA2 measurements from the author. I did not check them against hardware. - The author's suite run (1,647 tests: 1,628 passed, 18 skipped, 1 failed) and the validation-layer run are author-reported and not run here. - The directed-rounding numbers in the PR body and the debt entry at `docs/dev/debt/shader.md:197` are author measurements; no test in the tree pins them. - The PS5's gfx1013 is not measured, as the PR states. - Files read: the four reviewed files, through their diff hunks and the head functions above. I did not open their full text in `files/`. Files excluded by rule: none. **To get this to a good state** - Add a regression test for the directed branch (`Float64Instructions.cpp:47-51`) or mark it unpinned in the debt entry. - Point the PR body's `HW_ORACLE.md` link at the head SHA instead of `main`. - Rerun `agc_driver_cvt_f32_f64_denormal_result` and the `^(agc_|shader|vector_)` set on the new head.
MarcZX10 commented 2026-11-14 00:14:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T00:14:16Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the inspected implementation and added regression test support merging.

What I ran

Reviewed head d9888e1c5f89f9e13212703709e4e258133795c1. No commands or tests were run in this review. Read the prepared description, commits, manifest and diff, plus all four changed files through repo_read.py.

Results

Check Result Note
Diff and change scope passed Four changed files inspected
Tests not run Results in the description are author reported
Repository build not run No local execution available

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not independently run the reported hardware measurements, test suites, validation layer, or build. PS5 gfx1013 behavior and other hosts remain unmeasured per the description. No files were excluded from review; files.json was not available through the reader, and the manifest lists all four changed files as included and read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5899883175 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18487#pullrequestreview-5899883175). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T00:14:16Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the inspected implementation and added regression test support merging. ## What I ran Reviewed head `d9888e1c5f89f9e13212703709e4e258133795c1`. No commands or tests were run in this review. Read the prepared description, commits, manifest and diff, plus all four changed files through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Diff and change scope | passed | Four changed files inspected | | Tests | not run | Results in the description are author reported | | Repository build | not run | No local execution available | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not independently run the reported hardware measurements, test suites, validation layer, or build. PS5 gfx1013 behavior and other hosts remain unmeasured per the description. No files were excluded from review; `files.json` was not available through the reader, and the manifest lists all four changed files as included and read. ## To get this to a good state Nothing is required.
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!18487
No description provided.