fix(shader): compute V_FRACT_F32 from the exact fraction of |x| #1250

Merged
kr4y4 merged 1 commit from upstream-pr/1250 into main 2026-10-11 21:23:30 +00:00
kr4y4 commented 2026-10-07 19:47:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-07T19:47:06Z.


What

EmitFPFract32 emits GLSLstd450Fract. Vulkan specifies Fract as correctly rounded in the implementation's rounding mode, which may round down. Intel's frc does, on the Windows driver and on Mesa ANV:

agc_driver_vop1_float_unary: lane 13 fract_f32 v5 is 0x3f7fbd2b, expected 0x3f7fbd2c

The input is 0xba85a805. Its exact fraction is 0.99898028315…, so rounding to nearest gives 0x3f7fbd2c. On the Windows driver Fract stays at 0x3f7fbd2b even when the module declares RoundingModeRTE 32.

Emitting x - floor(x) (the first version of this PR) is not enough. When floor(x) has a single use, Mesa folds the subtraction back into ffract even with NoContraction (nir_opt_algebraic.py, a rule without ~), and ANV emits frc again. See @hashaam1217's comment below.

V_FRACT_F32 now emits fract(|x|), which is exact: the fraction of a non-negative float is representable, so there is nothing to round. For a negative non-integer x it returns 1 - fract(|x|), a single correctly rounded subtraction with the same value as x - floor(x). Edge cases:

  • NaN fails both ordered compares and passes through.
  • -0.0 and negative integers give +0.0.
  • Infinities are marked invalid by unaryFloatSpecials.
  • A small negative input whose 1 - f rounds to 1.0 is clamped to 0x3f7fffff there.

V_FRACT_F16 takes the same path. The formula is @hashaam1217's.

Source of the semantics:

  • Mesa defines ffract as src0 - floorf(src0) (src/compiler/nir/nir_opcodes.py), and ACO emits v_fract_f32 for it (src/amd/compiler/instruction_selection/aco_select_nir_alu.cpp, nir_op_ffract).
  • LLVM matches fsub(x, floor(x)), clamped below 1.0 with the infinity check kept, to v_fract_* (llvm/test/CodeGen/AMDGPU/fract-match.ll).

Not measured with the hardware oracle. The result follows the f32 rounding mode like any other f32 op (#981).

Tested

Windows 11 (26200), WinLibs GCC 15.2.0 r7, CI configure flags, main at 4764e59c, ctest --output-on-failure --timeout 120 --repeat until-fail:3:

  • Intel Raptor Lake-S Mobile Graphics (driver 32.0.101.6790), ANYPS5_GPU=Intel:
    • agc_driver_vop1_float_unary and agc_driver_f32_result_clamp pass; vop1_float_unary fails on main.
    • Full suite: 29 failures, all also failing on main for other causes on this device (no shaderFloat64, no shaderDeviceClock, compute subgroup width #1185, 64-bit atomics #1213, f16 denormals #981, OpSMulExtended #1246). None are new.
  • NVIDIA RTX 4070 Laptop GPU (driver 32.0.15.9597): full suite 395/395 passed.
  • On Linux, Intel Iris Xe with Mesa 25.2.8 ANV, and NVIDIA 595.91, @hashaam1217 ran this body: NVIDIA 402/402, and on Intel main's failures minus vop1_float_unary (comment below).

Checklist

  • Based on current main; no other open PR implements the same thing
  • One topic per PR
  • No comments in code except technical debt
  • No silent stubs added
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4777646938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250). Originally posted by [kr4y4](https://github.com/kr4y4) on 2026-10-07T19:47:06Z. --- ### What `EmitFPFract32` emits `GLSLstd450Fract`. Vulkan specifies `Fract` as correctly rounded in the implementation's rounding mode, which may round down. Intel's `frc` does, on the Windows driver and on Mesa ANV: ``` agc_driver_vop1_float_unary: lane 13 fract_f32 v5 is 0x3f7fbd2b, expected 0x3f7fbd2c ``` The input is `0xba85a805`. Its exact fraction is 0.99898028315…, so rounding to nearest gives `0x3f7fbd2c`. On the Windows driver `Fract` stays at `0x3f7fbd2b` even when the module declares `RoundingModeRTE 32`. Emitting `x - floor(x)` (the first version of this PR) is not enough. When `floor(x)` has a single use, Mesa folds the subtraction back into `ffract` even with `NoContraction` (`nir_opt_algebraic.py`, a rule without `~`), and ANV emits `frc` again. See @hashaam1217's comment below. `V_FRACT_F32` now emits `fract(|x|)`, which is exact: the fraction of a non-negative float is representable, so there is nothing to round. For a negative non-integer `x` it returns `1 - fract(|x|)`, a single correctly rounded subtraction with the same value as `x - floor(x)`. Edge cases: - NaN fails both ordered compares and passes through. - `-0.0` and negative integers give `+0.0`. - Infinities are marked invalid by `unaryFloatSpecials`. - A small negative input whose `1 - f` rounds to 1.0 is clamped to `0x3f7fffff` there. `V_FRACT_F16` takes the same path. The formula is @hashaam1217's. Source of the semantics: - Mesa defines `ffract` as `src0 - floorf(src0)` (`src/compiler/nir/nir_opcodes.py`), and ACO emits `v_fract_f32` for it (`src/amd/compiler/instruction_selection/aco_select_nir_alu.cpp`, `nir_op_ffract`). - LLVM matches `fsub(x, floor(x))`, clamped below 1.0 with the infinity check kept, to `v_fract_*` (`llvm/test/CodeGen/AMDGPU/fract-match.ll`). Not measured with the hardware oracle. The result follows the f32 rounding mode like any other f32 op (#981). ### Tested Windows 11 (26200), WinLibs GCC 15.2.0 r7, CI configure flags, main at 4764e59c, `ctest --output-on-failure --timeout 120 --repeat until-fail:3`: - Intel Raptor Lake-S Mobile Graphics (driver 32.0.101.6790), `ANYPS5_GPU=Intel`: - `agc_driver_vop1_float_unary` and `agc_driver_f32_result_clamp` pass; `vop1_float_unary` fails on main. - Full suite: 29 failures, all also failing on main for other causes on this device (no `shaderFloat64`, no `shaderDeviceClock`, compute subgroup width #1185, 64-bit atomics #1213, f16 denormals #981, `OpSMulExtended` #1246). None are new. - NVIDIA RTX 4070 Laptop GPU (driver 32.0.15.9597): full suite 395/395 passed. - On Linux, Intel Iris Xe with Mesa 25.2.8 ANV, and NVIDIA 595.91, @hashaam1217 ran this body: NVIDIA 402/402, and on Intel main's failures minus `vop1_float_unary` (comment below). ### Checklist - [x] Based on current `main`; no other open PR implements the same thing - [x] One topic per PR - [x] No comments in code except technical debt - [x] No silent stubs added - [x] No notes, investigation files or images added to the repository - [x] No new third-party code - [x] Generic, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hashaam1217 commented 2026-10-08 01:41:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hashaam1217 on 2026-10-08T01:41:54Z.


Checked this on Linux: Intel Iris Xe (Alder Lake GT2), Mesa 25.2.8 ANV, at 2cc5735d. vop1_float_unary and f32_result_clamp pass with this change (main fails with the same lane 13 fract_f32 v5 is 0x3f7fbd2b, expected 0x3f7fbd2c), and NVIDIA is unaffected.

On Mesa, though, the test passes only because Vop1FloatUnary also runs v_floor_f32 on the same registers. NIR merges the two ffloors, so the floor has two uses. When floor(x) has a single use, Mesa folds x - floor(x) back into ffract even with NoContraction (nir_opt_algebraic.py L480, which has no ~). ANV then emits frc, the instruction that rounds down.

Standalone check: one SPIR-V module per row, compiled with glslang and dispatched 1×1×1 on input 0xba85a805 (correctly rounded result 0x3f7fbd2c). The NIR and ISA columns are from INTEL_DEBUG=cs:

GLSL ANV final NIR → ISA Intel ANV NVIDIA 595.91
fract(x) ffract → frc 0x3f7fbd2b 0x3f7fbd2c
precise float r = x - floor(x); (the SPIR-V this PR emits: OpFSub + NoContraction) ffract! → frc 0x3f7fbd2b 0x3f7fbd2c
float r = x - floor(x); ffract → frc 0x3f7fbd2b 0x3f7fbd2c
float f = fract(abs(x)); float r = (x < 0.0 && f != 0.0) ? 1.0 - f : f; ffract(fabs), fadd, bcsel → frc (abs), add, sel 0x3f7fbd2c 0x3f7fbd2c

-1.5, -0.99999994 and 0.75 give the same results in every row on both GPUs.

The last form holds up because the fraction of a non-negative float is exactly representable, so frc has nothing to round. For a negative non-integer x, fract(x) = 1 - fract(|x|), which is then a single correctly rounded subtraction. As EmitFPFract32:

std::uint32_t EmitFPFract32(SpirvEmitterState& state, std::uint32_t arg0) {
    const auto magnitude = EmitGlsl<GLSLstd450FAbs, IrType::F32>(state, arg0);
    const auto fraction = EmitGlsl<GLSLstd450Fract, IrType::F32>(state, magnitude);
    const auto complement = EmitFPSub32(state, ConstantF32(state, 0x3f800000u), fraction);
    const auto negative = Binary(state, spv::OpFOrdLessThan, TypeBool(state), arg0, ConstantF32(state, 0u));
    const auto partial = Binary(state, spv::OpFOrdNotEqual, TypeBool(state), fraction, ConstantF32(state, 0u));
    const auto below = Binary(state, spv::OpLogicalAnd, TypeBool(state), negative, partial);
    return Select(state, TypeF32(state), below, complement, fraction);
}

NaN fails both ordered compares and passes through. -0.0 and negative integers give +0.0. -inf gives NaN, which unaryFloatSpecials already marks invalid. A tiny negative input where 1 - f rounds to 1.0 is still clamped to 0x3f7fffff by the translation.

With this body on 2cc5735d: NVIDIA full suite 402/402; on Intel, vop1_float_unary and f32_result_clamp pass, and the full suite (without flat_store, which runs out of memory there on main too) has 33 failures: main's 34 minus vop1_float_unary.

This is your fix, so feel free to take it into this PR; I won't open a competing one.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6050430337 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250#issuecomment-6050430337). Originally posted by [hashaam1217](https://github.com/hashaam1217) on 2026-10-08T01:41:54Z. --- Checked this on Linux: Intel Iris Xe (Alder Lake GT2), Mesa 25.2.8 ANV, at 2cc5735d. `vop1_float_unary` and `f32_result_clamp` pass with this change (main fails with the same `lane 13 fract_f32 v5 is 0x3f7fbd2b, expected 0x3f7fbd2c`), and NVIDIA is unaffected. On Mesa, though, the test passes only because `Vop1FloatUnary` also runs `v_floor_f32` on the same registers. NIR merges the two `ffloor`s, so the floor has two uses. When `floor(x)` has a single use, Mesa folds `x - floor(x)` back into `ffract` even with `NoContraction` ([`nir_opt_algebraic.py` L480](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.2.8/src/compiler/nir/nir_opt_algebraic.py#L480), which has no `~`). ANV then emits `frc`, the instruction that rounds down. Standalone check: one SPIR-V module per row, compiled with glslang and dispatched 1×1×1 on input `0xba85a805` (correctly rounded result `0x3f7fbd2c`). The NIR and ISA columns are from `INTEL_DEBUG=cs`: | GLSL | ANV final NIR → ISA | Intel ANV | NVIDIA 595.91 | |---|---|---|---| | `fract(x)` | `ffract` → `frc` | `0x3f7fbd2b` | `0x3f7fbd2c` | | `precise float r = x - floor(x);` (the SPIR-V this PR emits: `OpFSub` + `NoContraction`) | `ffract!` → `frc` | `0x3f7fbd2b` | `0x3f7fbd2c` | | `float r = x - floor(x);` | `ffract` → `frc` | `0x3f7fbd2b` | `0x3f7fbd2c` | | `float f = fract(abs(x)); float r = (x < 0.0 && f != 0.0) ? 1.0 - f : f;` | `ffract(fabs)`, `fadd`, `bcsel` → `frc (abs)`, `add`, `sel` | `0x3f7fbd2c` | `0x3f7fbd2c` | `-1.5`, `-0.99999994` and `0.75` give the same results in every row on both GPUs. The last form holds up because the fraction of a non-negative float is exactly representable, so `frc` has nothing to round. For a negative non-integer `x`, `fract(x) = 1 - fract(|x|)`, which is then a single correctly rounded subtraction. As `EmitFPFract32`: ```cpp std::uint32_t EmitFPFract32(SpirvEmitterState& state, std::uint32_t arg0) { const auto magnitude = EmitGlsl<GLSLstd450FAbs, IrType::F32>(state, arg0); const auto fraction = EmitGlsl<GLSLstd450Fract, IrType::F32>(state, magnitude); const auto complement = EmitFPSub32(state, ConstantF32(state, 0x3f800000u), fraction); const auto negative = Binary(state, spv::OpFOrdLessThan, TypeBool(state), arg0, ConstantF32(state, 0u)); const auto partial = Binary(state, spv::OpFOrdNotEqual, TypeBool(state), fraction, ConstantF32(state, 0u)); const auto below = Binary(state, spv::OpLogicalAnd, TypeBool(state), negative, partial); return Select(state, TypeF32(state), below, complement, fraction); } ``` NaN fails both ordered compares and passes through. `-0.0` and negative integers give `+0.0`. `-inf` gives NaN, which `unaryFloatSpecials` already marks invalid. A tiny negative input where `1 - f` rounds to 1.0 is still clamped to `0x3f7fffff` by the translation. With this body on 2cc5735d: NVIDIA full suite 402/402; on Intel, `vop1_float_unary` and `f32_result_clamp` pass, and the full suite (without `flat_store`, which runs out of memory there on main too) has 33 failures: main's 34 minus `vop1_float_unary`. This is your fix, so feel free to take it into this PR; I won't open a competing one.
kr4y4 commented 2026-10-08 02:07:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kr4y4 on 2026-10-08T02:07:31Z.


Thanks, that's a real hole. With a single-use floor this PR's first version only moved the problem into Mesa's algebraic pass. I've taken your fract(|x|) / 1 - fract(|x|) body into the commit, with you as co-author, and updated the description.

Re-run on Windows with that body (Raptor Lake-S, driver 32.0.101.6790, and RTX 4070, driver 32.0.15.9597):

  • vop1_float_unary and f32_result_clamp pass on both.
  • Full suite: NVIDIA 395/395. Intel has main's failures minus vop1_float_unary, and none are new.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6050707257 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250#issuecomment-6050707257). Originally posted by [kr4y4](https://github.com/kr4y4) on 2026-10-08T02:07:31Z. --- Thanks, that's a real hole. With a single-use floor this PR's first version only moved the problem into Mesa's algebraic pass. I've taken your `fract(|x|)` / `1 - fract(|x|)` body into the commit, with you as co-author, and updated the description. Re-run on Windows with that body (Raptor Lake-S, driver 32.0.101.6790, and RTX 4070, driver 32.0.15.9597): - `vop1_float_unary` and `f32_result_clamp` pass on both. - Full suite: NVIDIA 395/395. Intel has main's failures minus `vop1_float_unary`, and none are new.
adriadam10 commented 2026-10-08 09:36:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T09:36:06Z.


Heads-up: this PR is on hold, not rejected. v_fract_f32/v_fract_f16 results depend on the shader float mode (IEEE_MODE, DX10_CLAMP, the denormal bits of FLOAT_MODE in RSRC1). Real titles set that mode per shader, and the recompiler currently assumes a single one; see #981. Until that is settled, no float-mode dependent shader PR gets reviewed or merged. Nothing to do on your side for now. Once #981 lands, this will probably need tests for each mode value it relies on.

For when it resumes: on our HW oracle (gfx1035, IEEE=0, f32 denormals flushed and kept) this PR matched bit for bit on every finite input (4034 v_fract_f32 rows, all 65536 v_fract_f16 inputs); the only differences were sNaN inputs, from main's NaN handling, which is exactly the mode-dependent part.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6057007049 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250#issuecomment-6057007049). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T09:36:06Z. --- Heads-up: this PR is on hold, not rejected. `v_fract_f32`/`v_fract_f16` results depend on the shader float mode (IEEE_MODE, DX10_CLAMP, the denormal bits of FLOAT_MODE in RSRC1). Real titles set that mode per shader, and the recompiler currently assumes a single one; see #981. Until that is settled, no float-mode dependent shader PR gets reviewed or merged. Nothing to do on your side for now. Once #981 lands, this will probably need tests for each mode value it relies on. For when it resumes: on our HW oracle (gfx1035, IEEE=0, f32 denormals flushed and kept) this PR matched bit for bit on every finite input (4034 `v_fract_f32` rows, all 65536 `v_fract_f16` inputs); the only differences were sNaN inputs, from `main`'s NaN handling, which is exactly the mode-dependent part.
klosixgaming-arch commented 2026-10-10 14:30:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-10T14:30:49Z.


Independent validation on real hardware (no-regression; I have no Intel GPU to see the fix's effect)

Built and ran the PR head 480b0480 on my own box:

  • Windows 11 Pro (26200), WinLibs MinGW-w64 GCC 15.2.0 (r7), Release, BUILD_TESTING=ON.
  • GPUs: NVIDIA GeForce RTX 5090, NVIDIA GeForce RTX 4090, AMD Radeon (iGPU, Ryzen 9950X3D).

Results:

  • agc_driver_vop1_float_unary PASSES on all three of my GPUs (5090, 4090, AMD iGPU) with the fix.

Honest rigor finding — I could NOT reproduce the target bug: the regression this fixes is Intel-specific (Intel frc rounds Fract down; the failing lane 0xba85a805 → expected 0x3f7fbd2c). I do not have an Intel GPU, so I checked what the test does on my hardware with the fix reverted to the base GLSLstd450Fract: the test still passes on my 5090 (exit 0). In other words, on NVIDIA and AMD Fract is already correct, so base and this fix are indistinguishable on my machines — I can only confirm no-regression, not that the fix actually changes the Intel result. I did not run on Intel Raptor Lake / Iris Xe (ANV), so the actual rounding fix is unverified on my end.

Code-level read (agreeing with the approach): emitting fract(|x|) (with 1 − fract(|x|) for negative non-integers) is a reasonable way to sidestep the x − floor(x) form, since a non-negative fraction is exactly representable and Mesa/ANV can't fold it back into frc. I did not independently verify the driver-level folding claim (that's the crux and is hardware/driver dependent).

Also noted: the PR's mergeable_state shows as unstable (base df16c4c is behind current main) — I tested the head as-is, so I can't speak to a clean merge onto the latest main.

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6098548761 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250#issuecomment-6098548761). Originally posted by [klosixgaming-arch](https://github.com/klosixgaming-arch) on 2026-10-10T14:30:49Z. --- **Independent validation on real hardware (no-regression; I have no Intel GPU to see the fix's effect)** Built and ran the PR head `480b0480` on my own box: - **Windows 11 Pro (26200)**, WinLibs MinGW-w64 **GCC 15.2.0 (r7)**, `Release`, `BUILD_TESTING=ON`. - GPUs: **NVIDIA GeForce RTX 5090**, **NVIDIA GeForce RTX 4090**, **AMD Radeon (iGPU, Ryzen 9950X3D)**. **Results:** - `agc_driver_vop1_float_unary` **PASSES on all three of my GPUs** (5090, 4090, AMD iGPU) with the fix. **Honest rigor finding — I could NOT reproduce the target bug:** the regression this fixes is **Intel-specific** (Intel `frc` rounds `Fract` down; the failing lane `0xba85a805 → expected 0x3f7fbd2c`). I do **not** have an Intel GPU, so I checked what the test does on my hardware with the fix reverted to the base `GLSLstd450Fract`: **the test still passes on my 5090** (exit 0). In other words, on NVIDIA and AMD `Fract` is already correct, so base and this fix are indistinguishable on my machines — I can only confirm **no-regression**, not that the fix actually changes the Intel result. I did **not** run on Intel Raptor Lake / Iris Xe (ANV), so the actual rounding fix is unverified on my end. **Code-level read (agreeing with the approach):** emitting `fract(|x|)` (with `1 − fract(|x|)` for negative non-integers) is a reasonable way to sidestep the `x − floor(x)` form, since a non-negative fraction is exactly representable and Mesa/ANV can't fold it back into `frc`. I did not independently verify the driver-level folding claim (that's the crux and is hardware/driver dependent). **Also noted:** the PR's `mergeable_state` shows as *unstable* (base `df16c4c` is behind current main) — I tested the head as-is, so I can't speak to a clean merge onto the latest main. Written with AI assistance.
Silverash-i8 commented 2026-10-10 16:24:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-10T16:24:05Z.


Adding the Intel half that @klosixgaming-arch couldn't check: on Arrow Lake the fix does what it says.

Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release. Intel Graphics in a Core Ultra 9 275HX (Arrow Lake, device 0x7d67, driver 32.0.101.8991) and an RTX 5060 Laptop GPU (32.0.16.1742) in the same machine. 480b0480 cherry-picked onto current main 57f96fd2, which applies cleanly.

  • agc_driver_vop1_float_unary on the iGPU: fails on main every run (lane 13 fract_f32 v5 is 0x3f7fbd2b, expected 0x3f7fbd2c, the same value as the UHD 770 and 630 in #2114). With this PR it passes 3/3. It passes 3/3 on the RTX 5060 too.
  • Full ctest with the PR: 709/709 on the RTX 5060. On the iGPU (APS5_NO_PIPELINE_LTO=1), vop1_float_unary drops out of the failures and the 5 left are the ones with their own issues (#2815, #2822, #2805, and the two Float64 skips in #2114).

I understand it's on hold for #981, so this is just so the Intel number exists when that's settled.

AI-assisted (Claude Code); every number above is from runs on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099651452 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250#issuecomment-6099651452). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-10T16:24:05Z. --- Adding the Intel half that @klosixgaming-arch couldn't check: on Arrow Lake the fix does what it says. Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release. Intel Graphics in a Core Ultra 9 275HX (Arrow Lake, device 0x7d67, driver 32.0.101.8991) and an RTX 5060 Laptop GPU (32.0.16.1742) in the same machine. 480b0480 cherry-picked onto current `main` 57f96fd2, which applies cleanly. - `agc_driver_vop1_float_unary` on the iGPU: fails on `main` every run (`lane 13 fract_f32 v5 is 0x3f7fbd2b, expected 0x3f7fbd2c`, the same value as the UHD 770 and 630 in #2114). With this PR it passes 3/3. It passes 3/3 on the RTX 5060 too. - Full ctest with the PR: 709/709 on the RTX 5060. On the iGPU (`APS5_NO_PIPELINE_LTO=1`), `vop1_float_unary` drops out of the failures and the 5 left are the ones with their own issues (#2815, #2822, #2805, and the two Float64 skips in #2114). I understand it's on hold for #981, so this is just so the Intel number exists when that's settled. AI-assisted (Claude Code); every number above is from runs on this machine.
adriadam10 commented 2026-10-11 21:23:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:23:26Z.


Measured v_fract_f32 on the HW oracle (gfx1035, IEEE=0, f32 denormals flushed and kept): 4034 rows (0, -0, ±1, negative integers, tiny negatives, 0xba85a805, ±max, denormals, random) match this PR bit for bit on every finite input, and v_fract_f16 matches on every non-NaN input (all 65536 tested). Build + ctest green with the PR merged onto current main. We can't run the Intel fix here; it was confirmed by you, @hashaam1217 (ANV) and @Silverash-i8 (Arrow Lake), and @klosixgaming-arch saw no regression on NVIDIA/AMD. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113921581 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1250#issuecomment-6113921581). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:23:26Z. --- Measured `v_fract_f32` on the HW oracle (gfx1035, IEEE=0, f32 denormals flushed and kept): 4034 rows (0, -0, ±1, negative integers, tiny negatives, `0xba85a805`, ±max, denormals, random) match this PR bit for bit on every finite input, and `v_fract_f16` matches on every non-NaN input (all 65536 tested). Build + ctest green with the PR merged onto current main. We can't run the Intel fix here; it was confirmed by you, @hashaam1217 (ANV) and @Silverash-i8 (Arrow Lake), and @klosixgaming-arch saw no regression on NVIDIA/AMD. Merging.
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!1250
No description provided.