fix(shader): apply the output modifier to v_cvt_f32_f64 by the f32 denormal field #13847

Merged
Deftera186 merged 3 commits from upstream-pr/13847 into main 2026-11-10 01:28:34 +00:00
Deftera186 commented 2026-10-31 09:23:00 +00:00 (Migrated from github.com)

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


What

v_cvt_f32_f64 writes an f32 result, but TranslationContext::float64Operation handled its non-U64 result like an f64 result: it called rejectHalfOrDoubleOutputModifier (which checks the f16/f64 denormal field) and then set destination.omod = 0u before writeOperand, so the output modifier was dropped or threw. With mul:2 and a known float mode (FLOAT_MODE 0xc0, IEEE=0), v_cvt_f32_f64 of 1.0 returned 0x3f800000 where gfx1101 returns 0x40000000; with IEEE=0 and the f16/f64 output denormals flushed (e.g. FLOAT_MODE 0x40) the recompile threw output modifier on an f16 or f64 result with f16/f64 output denormals flushed is not implemented.

gfx1101 applies mul:2, mul:4 and div:2 to the converted f32 value exactly when IEEE mode is off and bit 1 of the f32 denormal field is clear (denorm32 0 or 1), for any f16/f64 field value, and ignores the modifier otherwise. That is the f32-result rule the recompiler already encodes in TranslationContext::outputModifierApplies(4u), applied by writeOperand through applyF32ResultModifiers. When the shader's float mode is known, the fix writes the result with writeOperand(inst.destination, result) so the f32 rule and clamp apply.

When the float mode is not known, the fix clears omod before writeOperand, so the modifier is dropped and the plain conversion (with clamp) is written. This differs from the native f32 ops, which assume the title default (IEEE off, f32 denormals flushed) and apply the modifier under a missing mode: v_cvt_f32_f64's applicability is gated on the f32 denormal field, which a missing mode does not pin, and the existing agc_driver_f64_rounding test measures a mode-less v_cvt_f32_f64 mul:2 writing the plain conversion (0xa1800000, not the scaled 0xa2000000), a value stable across the RADV, NVIDIA and AMD-Windows GPUs the CI runs. Applying the modifier under a missing mode regressed that test; gating on floatMode.has_value() keeps it green while preserving every measured explicit-mode result.

The three U32-result opcodes that reach the same branch (v_cvt_i32_f64, v_cvt_u32_f64, v_frexp_exp_i32_f64) are unaffected in either path: the decoder never sets an output modifier on them (they are not in isVop1FloatResultOpcode, so VOP3 clears omod), and writeOperand applies applyF32ResultModifiers only to an IrType::F32 value, so their U32 result goes straight to writeRawU32 as before.

Clamp is unchanged: writeOperand already passed destination.clamp through, and applyF32ResultModifiers applies it after the modifier, as the hardware does, under both the known-mode and missing-mode paths.

A separate gap, not changed here and left for a separate pull request: when the converted value is itself an f32 denormal, gfx1101 flushes it to a signed zero whenever bit 1 of the f32 denormal field is clear (denorm32 0 or 1), in both IEEE modes. f32DenormalFlushFor returns 0 for v_cvt_f32_f64, so the plain OpFConvert keeps the denormal at denorm32 1 on RADV. This is the same on main and independent of the output modifier. The test avoids inputs whose plain result is an f32 denormal; the rows where div:2 produces a denormal are kept, because scaleF32Result already collapses div:2 of a value below 0x01000000 to the signed zero the hardware writes.

The conversion-specific provenance (gfx1101, tools/hw-oracle, not RDNA2 or gfx1013) and this deferred denormal gap are recorded as two new entries in docs/dev/debt/shader.md, beside the existing output-modifier and clamp entries.

Sources:

  • isVop1FloatResultOpcode lists v_cvt_f32_f64 but not v_cvt_i32_f64/v_cvt_u32_f64/v_frexp_exp_i32_f64 (core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp); supportsNativeVop3ResultModifiers gates omod on it, so VOP3 sets omod = 0 for the three integer-result conversions.
  • makeMeta("ConvertF32F64", F32, U64) versus the U32-result ConvertS32F64/ConvertU32F64/FPFrexpExp64 (core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp).
  • Hardware measurements on gfx1101 with tools/hw-oracle, below.

Tested

Measured on RDNA3 (gfx1101, Radeon RX 7700 XT) with tools/hw-oracle; not measured on the PS5's gfx1013 or on RDNA2.

  • New execution test CvtF32F64OutputModifier.cpp (ctest agc_driver_cvt_f32_f64_output_modifier): 22 f64 inputs (normals, the f32 overflow boundary, values that round to the f32 minimum normal, values whose div:2 becomes an f32 denormal or zero, quiet and signaling NaNs, infinities, both zero signs) by eight forms (plain, mul:2, mul:4, div:2, each also with clamp). Modes: no float mode (modifier dropped, so the plain/clamped conversion, matching the missing-mode path above); FLOAT_MODE 0xc0 IEEE=0 and 0xd0 IEEE=0 (apply); 0x40 IEEE=0, which flushes the f64 output denormals and throws on main, proving the f16/f64 field no longer matters; 0xe0 and 0xf0 IEEE=0 and 0xc0 IEEE=1 (ignore). Expected values are the gfx1101 results for the explicit modes; the three NaN inputs assert NaN-ness on the unclamped columns, every other value is asserted bit-exact. The test keeps the spv::CapabilityFloat64 skip.
  • Red/green: with Float64Instructions.cpp reverted to origin/main and the test present, the first mismatch is v_cvt_f32_f64 output modifier: lane 0 0xc0 IEEE=0 v_cvt_f32_f64 mul:2 is 0x3f800000, expected 0x40000000; agc_driver_f64_rounding passes on main. With the fix the new test passes (0.45 s locally, 0.22 s on lavapipe) and agc_driver_f64_rounding still passes: its mode-less v_cvt_f32_f64 mul:2 writes the plain 0xa1800000, which the pre-fix no-mode-gate implementation scaled to 0xa2000000.
  • Hardware model: an oracle sweep (script and per-row results available on request) compares the fixed recompiler with gfx1101 over 22 inputs x 8 forms in 16 explicit modes (IEEE 0/1 x denorm32 0..3 x denorm16 0/3). The fix has 0 mismatches on every output-modifier and clamp column in every explicit mode. main has 176 mismatching results (52 at FLOAT_MODE 0xc0 IEEE=0, 76 at 0xd0 IEEE=0, and 24 in each of the two IEEE=1 denorm32 1 modes) and throws in the four IEEE=0 modes with denorm16 0. The fix's only differences from the hardware are 60 results at denorm32 1 on the three inputs whose plain conversion is an f32 denormal (plain and clamp with IEEE off; every column with IEEE on, where the modifier is ignored); they are the separate gap below and are the same on main. The sweep programs an explicit mode on every row, so it does not cover the missing-mode path, which the recompiler translates with the modifier dropped.
  • Paired validation-layer runs, same build dir, regex = the new test, agc_driver_dpp_no_form, agc_driver_f64_integer_arithmetic, agc_driver_nan_quieting (the existing execution tests that run v_cvt_f32_f64), agc_driver_f64_rounding, and the f64 *denormal_modes tests (f64_add_mul_denormal_modes, f64_rounding_denormal_modes, div_fixup_f64_denormal_modes). State A (fix reverted, test present): only the new test fails; Insert instance layer "VK_LAYER_KHRONOS_validation" count stable, missing-layer line 0, VUID- 0. State B (fix): all pass; missing-layer 0, VUID- 0. B's VUID count does not exceed A's.
  • lavapipe (Ubuntu 24.04 container, gcc 13, Release, SPIRV-Tools on): the paired set plus agc_driver_f32_output_modifier, all pass on llvmpipe (LLVM 20.1.2, 256 bits); times cvt 0.24 s, div_fixup_f64 0.22 s, dpp_no_form 0.04 s, f32_output_modifier 0.39 s, f64_add_mul 0.24 s, f64_integer 1.21 s, f64_rounding 0.47 s, nan_quieting 0.64 s.

Hardware results on gfx1101, FLOAT_MODE 0xc0, IEEE=0, DX10_CLAMP=1 (round to nearest even). The main column is the recompiler's mul:2 result before the fix, where it differed.

f64 input hw plain hw mul:2 hw mul:4 hw div:2 main mul:2 (before)
3ff0000000000000 3f800000 40000000 40800000 3f000000 3f800000
bff0000000000000 bf800000 c0000000 c0800000 bf000000 bf800000
4000000000000000 40000000 40800000 41000000 3f800000 40000000
47efffffe0000000 7f7fffff 7f800000 7f800000 7effffff 7f7fffff
47f0000000000000 7f800000 7f800000 7f800000 7f800000 7f800000
3810000000000000 00800000 01000000 01800000 00000000 00800000
380fffffffffffff 00800000 01000000 01800000 00000000 00800000
3e80000000000000 34000000 34800000 35000000 33800000 34000000
7ff4000000000000 7fe00000 7fe00000 7fe00000 7fe00000 7fe00000
8000000000000000 80000000 00000000 00000000 00000000 80000000

At FLOAT_MODE 0xe0/0xf0 IEEE=0 (f32 denormal field bit 1 set) and at 0xc0 IEEE=1 the hardware ignores the modifier: every column equals the plain result. Without a known float mode the translation also writes the plain result, matching agc_driver_f64_rounding. The div:2 of a value that converts to the f32 minimum normal (0x00800000 from 0x3810000000000000, 0x380fffffffffffff) is the signed zero the hardware writes.

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:5096283182 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13847). Originally posted by [Deftera186](https://github.com/Deftera186) on 2026-10-31T09:23:00Z. --- ### What `v_cvt_f32_f64` writes an f32 result, but `TranslationContext::float64Operation` handled its non-U64 result like an f64 result: it called `rejectHalfOrDoubleOutputModifier` (which checks the f16/f64 denormal field) and then set `destination.omod = 0u` before `writeOperand`, so the output modifier was dropped or threw. With `mul:2` and a known float mode (FLOAT_MODE 0xc0, IEEE=0), `v_cvt_f32_f64` of 1.0 returned 0x3f800000 where gfx1101 returns 0x40000000; with IEEE=0 and the f16/f64 output denormals flushed (e.g. FLOAT_MODE 0x40) the recompile threw `output modifier on an f16 or f64 result with f16/f64 output denormals flushed is not implemented`. gfx1101 applies `mul:2`, `mul:4` and `div:2` to the converted f32 value exactly when IEEE mode is off and bit 1 of the **f32** denormal field is clear (denorm32 0 or 1), for any f16/f64 field value, and ignores the modifier otherwise. That is the f32-result rule the recompiler already encodes in `TranslationContext::outputModifierApplies(4u)`, applied by `writeOperand` through `applyF32ResultModifiers`. When the shader's float mode is known, the fix writes the result with `writeOperand(inst.destination, result)` so the f32 rule and `clamp` apply. When the float mode is **not** known, the fix clears `omod` before `writeOperand`, so the modifier is dropped and the plain conversion (with `clamp`) is written. This differs from the native f32 ops, which assume the title default (IEEE off, f32 denormals flushed) and apply the modifier under a missing mode: `v_cvt_f32_f64`'s applicability is gated on the f32 denormal field, which a missing mode does not pin, and the existing `agc_driver_f64_rounding` test measures a mode-less `v_cvt_f32_f64 mul:2` writing the plain conversion (`0xa1800000`, not the scaled `0xa2000000`), a value stable across the RADV, NVIDIA and AMD-Windows GPUs the CI runs. Applying the modifier under a missing mode regressed that test; gating on `floatMode.has_value()` keeps it green while preserving every measured explicit-mode result. The three U32-result opcodes that reach the same branch (`v_cvt_i32_f64`, `v_cvt_u32_f64`, `v_frexp_exp_i32_f64`) are unaffected in either path: the decoder never sets an output modifier on them (they are not in `isVop1FloatResultOpcode`, so VOP3 clears `omod`), and `writeOperand` applies `applyF32ResultModifiers` only to an `IrType::F32` value, so their U32 result goes straight to `writeRawU32` as before. Clamp is unchanged: `writeOperand` already passed `destination.clamp` through, and `applyF32ResultModifiers` applies it after the modifier, as the hardware does, under both the known-mode and missing-mode paths. A separate gap, not changed here and left for a separate pull request: when the converted value is itself an f32 denormal, gfx1101 flushes it to a signed zero whenever bit 1 of the f32 denormal field is clear (denorm32 0 or 1), in both IEEE modes. `f32DenormalFlushFor` returns 0 for `v_cvt_f32_f64`, so the plain `OpFConvert` keeps the denormal at denorm32 1 on RADV. This is the same on `main` and independent of the output modifier. The test avoids inputs whose plain result is an f32 denormal; the rows where `div:2` produces a denormal are kept, because `scaleF32Result` already collapses `div:2` of a value below 0x01000000 to the signed zero the hardware writes. The conversion-specific provenance (gfx1101, tools/hw-oracle, not RDNA2 or gfx1013) and this deferred denormal gap are recorded as two new entries in `docs/dev/debt/shader.md`, beside the existing output-modifier and clamp entries. Sources: - `isVop1FloatResultOpcode` lists `v_cvt_f32_f64` but not `v_cvt_i32_f64`/`v_cvt_u32_f64`/`v_frexp_exp_i32_f64` (`core/shader/recompiler/RdnaDecoder/src/RdnaVectorOpDecoder.cpp`); `supportsNativeVop3ResultModifiers` gates `omod` on it, so VOP3 sets `omod = 0` for the three integer-result conversions. - `makeMeta("ConvertF32F64", F32, U64)` versus the `U32`-result `ConvertS32F64`/`ConvertU32F64`/`FPFrexpExp64` (`core/shader/recompiler/IntermediateRepresentation/src/IrOpcode.cpp`). - Hardware measurements on gfx1101 with tools/hw-oracle, below. ### Tested Measured on RDNA3 (gfx1101, Radeon RX 7700 XT) with tools/hw-oracle; not measured on the PS5's gfx1013 or on RDNA2. - New execution test `CvtF32F64OutputModifier.cpp` (ctest `agc_driver_cvt_f32_f64_output_modifier`): 22 f64 inputs (normals, the f32 overflow boundary, values that round to the f32 minimum normal, values whose `div:2` becomes an f32 denormal or zero, quiet and signaling NaNs, infinities, both zero signs) by eight forms (plain, `mul:2`, `mul:4`, `div:2`, each also with `clamp`). Modes: no float mode (modifier dropped, so the plain/clamped conversion, matching the missing-mode path above); FLOAT_MODE 0xc0 IEEE=0 and 0xd0 IEEE=0 (apply); 0x40 IEEE=0, which flushes the f64 output denormals and throws on `main`, proving the f16/f64 field no longer matters; 0xe0 and 0xf0 IEEE=0 and 0xc0 IEEE=1 (ignore). Expected values are the gfx1101 results for the explicit modes; the three NaN inputs assert NaN-ness on the unclamped columns, every other value is asserted bit-exact. The test keeps the `spv::CapabilityFloat64` skip. - Red/green: with `Float64Instructions.cpp` reverted to `origin/main` and the test present, the first mismatch is `v_cvt_f32_f64 output modifier: lane 0 0xc0 IEEE=0 v_cvt_f32_f64 mul:2 is 0x3f800000, expected 0x40000000`; `agc_driver_f64_rounding` passes on `main`. With the fix the new test passes (0.45 s locally, 0.22 s on lavapipe) and `agc_driver_f64_rounding` still passes: its mode-less `v_cvt_f32_f64 mul:2` writes the plain `0xa1800000`, which the pre-fix no-mode-gate implementation scaled to `0xa2000000`. - Hardware model: an oracle sweep (script and per-row results available on request) compares the fixed recompiler with gfx1101 over 22 inputs x 8 forms in 16 explicit modes (IEEE 0/1 x denorm32 0..3 x denorm16 0/3). The fix has 0 mismatches on every output-modifier and clamp column in every explicit mode. `main` has 176 mismatching results (52 at FLOAT_MODE 0xc0 IEEE=0, 76 at 0xd0 IEEE=0, and 24 in each of the two IEEE=1 denorm32 1 modes) and throws in the four IEEE=0 modes with denorm16 0. The fix's only differences from the hardware are 60 results at denorm32 1 on the three inputs whose plain conversion is an f32 denormal (plain and clamp with IEEE off; every column with IEEE on, where the modifier is ignored); they are the separate gap below and are the same on `main`. The sweep programs an explicit mode on every row, so it does not cover the missing-mode path, which the recompiler translates with the modifier dropped. - Paired validation-layer runs, same build dir, regex = the new test, `agc_driver_dpp_no_form`, `agc_driver_f64_integer_arithmetic`, `agc_driver_nan_quieting` (the existing execution tests that run `v_cvt_f32_f64`), `agc_driver_f64_rounding`, and the f64 `*denormal_modes` tests (`f64_add_mul_denormal_modes`, `f64_rounding_denormal_modes`, `div_fixup_f64_denormal_modes`). State A (fix reverted, test present): only the new test fails; `Insert instance layer "VK_LAYER_KHRONOS_validation"` count stable, missing-layer line 0, `VUID-` 0. State B (fix): all pass; missing-layer 0, `VUID-` 0. B's VUID count does not exceed A's. - lavapipe (Ubuntu 24.04 container, gcc 13, Release, SPIRV-Tools on): the paired set plus `agc_driver_f32_output_modifier`, all pass on `llvmpipe (LLVM 20.1.2, 256 bits)`; times cvt 0.24 s, div_fixup_f64 0.22 s, dpp_no_form 0.04 s, f32_output_modifier 0.39 s, f64_add_mul 0.24 s, f64_integer 1.21 s, f64_rounding 0.47 s, nan_quieting 0.64 s. Hardware results on gfx1101, FLOAT_MODE 0xc0, IEEE=0, DX10_CLAMP=1 (round to nearest even). The `main` column is the recompiler's `mul:2` result before the fix, where it differed. | f64 input | hw plain | hw mul:2 | hw mul:4 | hw div:2 | main mul:2 (before) | |---|---|---|---|---|---| | 3ff0000000000000 | 3f800000 | 40000000 | 40800000 | 3f000000 | 3f800000 | | bff0000000000000 | bf800000 | c0000000 | c0800000 | bf000000 | bf800000 | | 4000000000000000 | 40000000 | 40800000 | 41000000 | 3f800000 | 40000000 | | 47efffffe0000000 | 7f7fffff | 7f800000 | 7f800000 | 7effffff | 7f7fffff | | 47f0000000000000 | 7f800000 | 7f800000 | 7f800000 | 7f800000 | 7f800000 | | 3810000000000000 | 00800000 | 01000000 | 01800000 | 00000000 | 00800000 | | 380fffffffffffff | 00800000 | 01000000 | 01800000 | 00000000 | 00800000 | | 3e80000000000000 | 34000000 | 34800000 | 35000000 | 33800000 | 34000000 | | 7ff4000000000000 | 7fe00000 | 7fe00000 | 7fe00000 | 7fe00000 | 7fe00000 | | 8000000000000000 | 80000000 | 00000000 | 00000000 | 00000000 | 80000000 | At FLOAT_MODE 0xe0/0xf0 IEEE=0 (f32 denormal field bit 1 set) and at 0xc0 IEEE=1 the hardware ignores the modifier: every column equals the plain result. Without a known float mode the translation also writes the plain result, matching `agc_driver_f64_rounding`. The `div:2` of a value that converts to the f32 minimum normal (0x00800000 from 0x3810000000000000, 0x380fffffffffffff) is the signed zero the hardware writes. 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:25:00 +00:00 (Migrated from github.com)

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

Review: APPROVED


Reviewed — looks good

At head 211d10cadc55bf85adeb311bea77b28bbf6e4eed, the change routes the f32 conversion result through the existing f32 modifier/clamp handling, and I found no blocking issue.

What I ran

GitHub reports PR base beb7ce3c4a5ff81765d438e523b1dd386d947dc8; because main advanced, I also checked the exact head against current main d8ffa97effa1ab0113dc265d936e94322045875d. The merge preview was clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was invoked.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13847 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13847
git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-13847
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-13847 --title 'fix(shader): apply the output modifier to v_cvt_f32_f64 by the f32 denormal field' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13847/pr-body.md
git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-13847
git merge-tree --write-tree refs/remotes/upstream/pr-13845 refs/remotes/upstream/pr-13847
git merge-tree --write-tree refs/remotes/upstream/pr-13842 refs/remotes/upstream/pr-13847

Results

Check Result
Diff check and conventions Passed against current main.
Merge previews Clean against current main, #13845, and #13842.
Source and test inspection writeOperand applies the existing f32 result-modifier/clamp path to f32 values; the new test checks plain, mul:2, mul:4, div:2, clamp combinations, and mode-dependent apply/ignore behavior.
No-build precheck Diff, conventions/template, and mergeability passed. Its ABI and test-quality helper rows failed because the isolated checkout lacks local-only helper scripts; ABI auditing does not apply here, and CMake's execution-test glob registers the added test.
Local build / focused C++ test Not run; the initial review avoids building.
Hosted CI Eligibility, conventions, portability, intake, labels, and report passed. Linux product job was skipped; Windows was in progress, relinker ASan was in progress, and macOS relinker jobs were queued in the latest snapshot.
Selected unedited command output

Conventions:

All conventions checks passed.

Merge previews, in command order:

9760d3c1fc0eaec3e9e596689aa421c173026daf
177ebb12e9614e1226f19fa21ec8a8f83ad45b32
538ae71cfcd1e22a9f26562446dbaaf3dc23bd4b

Negative control

Assertion Mutation Result
The new test detects the prior dropped/throwing output-modifier behavior. Author reports reverting the implementation while retaining the test. Author-reported red/green result; not independently run here.

Findings

Blocking

None found.

Non-blocking

The author reports the paired focused validation-layer runs on gfx1101/RADV and the lavapipe suite; I did not independently run them. The PS5 gfx1013/RDNA2 is not measured. The added code uses the existing generic f32 modifier path, so this does not block approval.

Sources

Not verified

No local build, CTest run, or negative control was performed. The hardware and lavapipe results are author-reported; no PS5 gfx1013/RDNA2 run was available. The latest hosted Windows and specialized relinker jobs had not finished.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722156582 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13847#pullrequestreview-5722156582). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T09:25:00Z. **Review:** APPROVED --- # Reviewed — looks good At head `211d10cadc55bf85adeb311bea77b28bbf6e4eed`, the change routes the f32 conversion result through the existing f32 modifier/clamp handling, and I found no blocking issue. ## What I ran GitHub reports PR base `beb7ce3c4a5ff81765d438e523b1dd386d947dc8`; because `main` advanced, I also checked the exact head against current `main` `d8ffa97effa1ab0113dc265d936e94322045875d`. The merge preview was clean. Environment: Linux x86_64, Python 3.11.2, Git 2.39.5; no compiler was invoked. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13847 --no-negative-controls --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13847 git diff --check refs/remotes/upstream/main...refs/remotes/upstream/pr-13847 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/remotes/upstream/pr-13847 --title 'fix(shader): apply the output modifier to v_cvt_f32_f64 by the f32 denormal field' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13847/pr-body.md git merge-tree --write-tree refs/remotes/upstream/main refs/remotes/upstream/pr-13847 git merge-tree --write-tree refs/remotes/upstream/pr-13845 refs/remotes/upstream/pr-13847 git merge-tree --write-tree refs/remotes/upstream/pr-13842 refs/remotes/upstream/pr-13847 ``` ## Results | Check | Result | |---|---| | Diff check and conventions | Passed against current `main`. | | Merge previews | Clean against current `main`, #13845, and #13842. | | Source and test inspection | `writeOperand` applies the existing f32 result-modifier/clamp path to f32 values; the new test checks plain, `mul:2`, `mul:4`, `div:2`, clamp combinations, and mode-dependent apply/ignore behavior. | | No-build precheck | Diff, conventions/template, and mergeability passed. Its ABI and test-quality helper rows failed because the isolated checkout lacks local-only helper scripts; ABI auditing does not apply here, and CMake's execution-test glob registers the added test. | | Local build / focused C++ test | Not run; the initial review avoids building. | | Hosted CI | Eligibility, conventions, portability, intake, labels, and report passed. Linux product job was skipped; Windows was in progress, relinker ASan was in progress, and macOS relinker jobs were queued in the latest snapshot. | <details><summary>Selected unedited command output</summary> Conventions: ```text All conventions checks passed. ``` Merge previews, in command order: ```text 9760d3c1fc0eaec3e9e596689aa421c173026daf 177ebb12e9614e1226f19fa21ec8a8f83ad45b32 538ae71cfcd1e22a9f26562446dbaaf3dc23bd4b ``` </details> ## Negative control | Assertion | Mutation | Result | |---|---|---| | The new test detects the prior dropped/throwing output-modifier behavior. | Author reports reverting the implementation while retaining the test. | Author-reported red/green result; not independently run here. | ## Findings ### Blocking None found. ### Non-blocking The author reports the paired focused validation-layer runs on gfx1101/RADV and the lavapipe suite; I did not independently run them. The PS5 gfx1013/RDNA2 is not measured. The added code uses the existing generic f32 modifier path, so this does not block approval. ## Sources - [Changed f64 conversion result handling at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/211d10cadc55bf85adeb311bea77b28bbf6e4eed/core/shader/recompiler/Translation/src/Float64Instructions.cpp) - [Existing f32 result modifier implementation at the checked current base](https://github.com/boykopovar/AnyPS5/blob/d8ffa97effa1ab0113dc265d936e94322045875d/core/shader/recompiler/Translation/src/TranslationContext/OperandAccess.cpp) - [Added execution test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/211d10cadc55bf85adeb311bea77b28bbf6e4eed/core/libs/prx/libSceAgcDriver/tests/execution/CvtF32F64OutputModifier.cpp) ## Not verified No local build, CTest run, or negative control was performed. The hardware and lavapipe results are author-reported; no PS5 gfx1013/RDNA2 run was available. The latest hosted Windows and specialized relinker jobs had not finished.
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!13847
No description provided.