fix(shader): flush v_add_f64 and v_mul_f64 denormals by the f64 field #7042

Merged
thuanquang merged 5 commits from upstream-pr/7042 into main 2026-10-19 22:52:05 +00:00
thuanquang commented 2026-10-17 07:23:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-17T07:23:17Z.


What

v_add_f64 and v_mul_f64 ignored the FLOAT_MODE f16/f64 denormal field (bits 7:6). On the GPU:

  • with bit 6 clear (modes 0 and 2) both inputs are flushed to a zero of their sign, so v_add_f64 2^-1074, 0 is +0 where main gives 2^-1074, and v_add_f64 2^-1022, -2^-1074 is 2^-1022 where main gives the denormal 0x000fffffffffffff;
  • with bit 7 clear (modes 0 and 1) a sum below 2^-1022 is flushed to a zero of its sign, and a product is flushed when its exact value, rounded to 53 significant bits with an unbounded exponent, is below 2^-1022, the rule v_mul_f32 and v_mul_f16 follow. So 0x2000000000000001 * 0x1ffffffffffffffe (exactly 2^-1022 - 2^-1126) rounds to 2^-1022 and is kept; detecting tininess before rounding flushes it and disagrees with the GPU on 4 (mode 0) and 8 (mode 1) of 484 rows.

float64Operation now flushes the sources of these two opcodes with flushF64Bits, and flushTinyF64Result flushes a tiny result: a sum is tested directly (tiny sums are exact), a product by multiplying one source by 2^64 on the host and comparing the magnitude with 2^-958, which is the 53-bit rounding of the exact product scaled into the normal range. Modes that keep denormals, and shaders without a known float mode, are translated as before. v_fma_f64 and v_div_fmas_f64 (recorded as a separate gap in the technical debt), min/max (#6760) and the compares (#6850) are not touched.

This builds on #7036, which adds flushF64Bits and changes the same lines of float64Operation; until it merges, this diff includes its commit.

Measured

The same instructions were run directly on the GPU with the tools/hw-oracle template, launched through the driver's HIP runtime, and through the recompiler on Vulkan, at IEEE 0 and 1, over the 576 pairs of 24 f64 values (±0, ±2^-1074, ±0x000fffffffffffff, 0x0008000000000000, ±2^-1022, 0x0010000000000001, ±0.5, ±1, 0x3ff0000000000001, 0x3feffffffffffffe, 0x2000000000000001, 0x1ffffffffffffffe, 2^-1021, 0x7fefffffffffffff, ±inf, 2^52, 2^-53):

f64 denormal mode main vs GPU, add / mul this change vs GPU, add / mul
0 81 / 113 0 / 0
1 46 / 69 0 / 0
2 79 / 92 0 / 0
3 0 / 0 0 / 0

With this change every mode also matches for -src0, |src1| (add), |src0|, -src1 (mul) and clamp on both. Over a second set of 529 pairs with quiet and signaling NaNs, add and mul match in every mode except 44 rows per instruction that differ only in NaN payload at IEEE=0, in all four modes and the same on main (f64 NaN bits are left to the driver, as the technical debt records).

Tested

Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, ANYPS5_REQUIRE_VULKAN=1:

  • New agc_driver_f64_add_mul_denormal_modes: both instructions over 16 pairs (denormal inputs, tiny sums, products at 2^-1022 before and after rounding, signed zeros) in f64 denormal modes 0 to 3 at IEEE 0 and 1 and without a known float mode, against the GPU's results for each mode. On main it fails: v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000. With this change it passes.
  • Full ctest --parallel 4 --timeout 120 on main f8b22edfb with #7036 and this change: 1369 tests, 2 fail, both failing on main on this GPU too: agc_driver_lds_mixed_width_atomics (#5271) and agc_driver_layered_volume_vertex_no_gpl (#4768). agc_driver_f64_arithmetic, agc_driver_f64_rounding_denormal_modes and the other f64 tests pass.
  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • Rebased onto main 7a36de66b on 2026-10-19, after #6760 (f64 min and max input denormal mode) merged. The only conflict was in Float64Instructions.cpp, where #6760 renamed nonIeeeMinMaxF64 to minMaxF64 and added its input flush; flushTinyF64Result now sits before main's function, which is unchanged.
    On the RX 6700 XT, all 11 agc_driver_f64_* tests pass 2 of 2 on the rebased code (head 9c048ee16; the last rebase step only shortened this PR's debt entry to fit the new 1000-character limit), including agc_driver_f64_arithmetic (#6760's min/max denormal rows), agc_driver_f64_add_mul_denormal_modes and agc_driver_f64_rounding_denormal_modes. The full suite was not rerun on it.
  • Not tested: the PS5's gfx1013, other AMD drivers, NVIDIA, Intel, and titles.

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: #7036
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4898233764 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-17T07:23:17Z. --- ### What `v_add_f64` and `v_mul_f64` ignored the `FLOAT_MODE` f16/f64 denormal field (bits 7:6). On the GPU: - with bit 6 clear (modes 0 and 2) both inputs are flushed to a zero of their sign, so `v_add_f64 2^-1074, 0` is `+0` where `main` gives `2^-1074`, and `v_add_f64 2^-1022, -2^-1074` is `2^-1022` where `main` gives the denormal `0x000fffffffffffff`; - with bit 7 clear (modes 0 and 1) a sum below 2^-1022 is flushed to a zero of its sign, and a product is flushed when its exact value, rounded to 53 significant bits with an unbounded exponent, is below 2^-1022, the rule `v_mul_f32` and `v_mul_f16` follow. So `0x2000000000000001 * 0x1ffffffffffffffe` (exactly 2^-1022 - 2^-1126) rounds to 2^-1022 and is kept; detecting tininess before rounding flushes it and disagrees with the GPU on 4 (mode 0) and 8 (mode 1) of 484 rows. `float64Operation` now flushes the sources of these two opcodes with `flushF64Bits`, and `flushTinyF64Result` flushes a tiny result: a sum is tested directly (tiny sums are exact), a product by multiplying one source by 2^64 on the host and comparing the magnitude with 2^-958, which is the 53-bit rounding of the exact product scaled into the normal range. Modes that keep denormals, and shaders without a known float mode, are translated as before. `v_fma_f64` and `v_div_fmas_f64` (recorded as a separate gap in the technical debt), min/max (#6760) and the compares (#6850) are not touched. This builds on #7036, which adds `flushF64Bits` and changes the same lines of `float64Operation`; until it merges, this diff includes its commit. ### Measured The same instructions were run directly on the GPU with the `tools/hw-oracle` template, launched through the driver's HIP runtime, and through the recompiler on Vulkan, at IEEE 0 and 1, over the 576 pairs of 24 f64 values (±0, ±2^-1074, ±0x000fffffffffffff, 0x0008000000000000, ±2^-1022, 0x0010000000000001, ±0.5, ±1, 0x3ff0000000000001, 0x3feffffffffffffe, 0x2000000000000001, 0x1ffffffffffffffe, 2^-1021, 0x7fefffffffffffff, ±inf, 2^52, 2^-53): | f64 denormal mode | `main` vs GPU, add / mul | this change vs GPU, add / mul | |---|---|---| | 0 | 81 / 113 | 0 / 0 | | 1 | 46 / 69 | 0 / 0 | | 2 | 79 / 92 | 0 / 0 | | 3 | 0 / 0 | 0 / 0 | With this change every mode also matches for `-src0, |src1|` (add), `|src0|, -src1` (mul) and `clamp` on both. Over a second set of 529 pairs with quiet and signaling NaNs, add and mul match in every mode except 44 rows per instruction that differ only in NaN payload at IEEE=0, in all four modes and the same on `main` (f64 NaN bits are left to the driver, as the technical debt records). ### Tested Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, `ANYPS5_REQUIRE_VULKAN=1`: - New `agc_driver_f64_add_mul_denormal_modes`: both instructions over 16 pairs (denormal inputs, tiny sums, products at 2^-1022 before and after rounding, signed zeros) in f64 denormal modes 0 to 3 at IEEE 0 and 1 and without a known float mode, against the GPU's results for each mode. On `main` it fails: `v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000`. With this change it passes. - Full `ctest --parallel 4 --timeout 120` on `main` `f8b22edfb` with #7036 and this change: 1369 tests, 2 fail, both failing on `main` on this GPU too: `agc_driver_lds_mixed_width_atomics` (#5271) and `agc_driver_layered_volume_vertex_no_gpl` (#4768). `agc_driver_f64_arithmetic`, `agc_driver_f64_rounding_denormal_modes` and the other f64 tests pass. - `python tools/check_conventions.py --base origin/main` with this title and body passes. - Rebased onto `main` `7a36de66b` on 2026-10-19, after #6760 (f64 min and max input denormal mode) merged. The only conflict was in `Float64Instructions.cpp`, where #6760 renamed `nonIeeeMinMaxF64` to `minMaxF64` and added its input flush; `flushTinyF64Result` now sits before `main`'s function, which is unchanged. On the RX 6700 XT, all 11 `agc_driver_f64_*` tests pass 2 of 2 on the rebased code (head 9c048ee16; the last rebase step only shortened this PR's debt entry to fit the new 1000-character limit), including `agc_driver_f64_arithmetic` (#6760's min/max denormal rows), `agc_driver_f64_add_mul_denormal_modes` and `agc_driver_f64_rounding_denormal_modes`. The full suite was not rerun on it. - Not tested: the PS5's gfx1013, other AMD drivers, NVIDIA, Intel, and titles. ### 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: #7036 - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
oneandonlydean commented 2026-10-17 07:30:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T07:30:06Z.


This branch includes #7036's current head (5bc68b1cc), so it inherits that PR's Linux CI failure in agc_driver_f64_rounding_denormal_modes (llvmpipe, see https://github.com/boykopovar/AnyPS5/pull/7036#issuecomment-6231058756). The new F64AddMulDenormalModes test looks exposed to the same thing: its kept-denormal rows (modes 1/3/unknown) do host f64 arithmetic on denormals, and lavapipe may flush f64 subnormals.

Suggestion for both tests: gate the kept-denormal rows on shaderDenormPreserveFloat64, the way the existing f64 subnormal test does, then rebase this PR onto the fixed #7036. We would merge them as a pair, #7036 first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231227665 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#issuecomment-6231227665). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T07:30:06Z. --- This branch includes #7036's current head (5bc68b1cc), so it inherits that PR's Linux CI failure in agc_driver_f64_rounding_denormal_modes (llvmpipe, see https://github.com/boykopovar/AnyPS5/pull/7036#issuecomment-6231058756). The new F64AddMulDenormalModes test looks exposed to the same thing: its kept-denormal rows (modes 1/3/unknown) do host f64 arithmetic on denormals, and lavapipe may flush f64 subnormals. Suggestion for both tests: gate the kept-denormal rows on shaderDenormPreserveFloat64, the way the existing f64 subnormal test does, then rebase this PR onto the fixed #7036. We would merge them as a pair, #7036 first.
github-actions[bot] commented 2026-10-17 07:40:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T07:40:29Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 4072 core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp
PR 5021 docs/dev/debt/shader.md
PR 5371 docs/dev/debt/shader.md
PR 5426 docs/dev/debt/shader.md
PR 5500 docs/dev/debt/shader.md
PR 5941 docs/dev/debt/shader.md
PR 6009 docs/dev/debt/shader.md
PR 6235 docs/dev/debt/shader.md
PR 6280 docs/dev/debt/shader.md
PR 6412 docs/dev/debt/shader.md
PR 6488 docs/dev/debt/shader.md
PR 6604 docs/dev/debt/shader.md
PR 6612 docs/dev/debt/shader.md
PR 6679 docs/dev/debt/shader.md
PR 6924 docs/dev/debt/shader.md
PR 6977 docs/dev/debt/shader.md
PR 7223 docs/dev/debt/shader.md
PR 7332 docs/dev/debt/shader.md
PR 7392 docs/dev/debt/shader.md
PR 7395 docs/dev/debt/shader.md
PR 7410 core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp
docs/dev/debt/shader.md
PR 7484 docs/dev/debt/shader.md
PR 7684 docs/dev/debt/shader.md
PR 7888 docs/dev/debt/shader.md
PR 7922 docs/dev/debt/shader.md
PR 8004 docs/dev/debt/shader.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231314894 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#issuecomment-6231314894). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T07:40:29Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 4072](https://www.github.com/boykopovar/AnyPS5/pull/4072) | `core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/shader.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `docs/dev/debt/shader.md` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `docs/dev/debt/shader.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `docs/dev/debt/shader.md` | | [PR 5941](https://www.github.com/boykopovar/AnyPS5/pull/5941) | `docs/dev/debt/shader.md` | | [PR 6009](https://www.github.com/boykopovar/AnyPS5/pull/6009) | `docs/dev/debt/shader.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `docs/dev/debt/shader.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `docs/dev/debt/shader.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/shader.md` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `docs/dev/debt/shader.md` | | [PR 6604](https://www.github.com/boykopovar/AnyPS5/pull/6604) | `docs/dev/debt/shader.md` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `docs/dev/debt/shader.md` | | [PR 6679](https://www.github.com/boykopovar/AnyPS5/pull/6679) | `docs/dev/debt/shader.md` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/debt/shader.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/shader.md` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `docs/dev/debt/shader.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `docs/dev/debt/shader.md` | | [PR 7392](https://www.github.com/boykopovar/AnyPS5/pull/7392) | `docs/dev/debt/shader.md` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `docs/dev/debt/shader.md` | | [PR 7410](https://www.github.com/boykopovar/AnyPS5/pull/7410) | `core/shader/recompiler/Translation/include/Translation/TranslationContext.hpp`<br>`docs/dev/debt/shader.md` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `docs/dev/debt/shader.md` | | [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `docs/dev/debt/shader.md` | | [PR 7888](https://www.github.com/boykopovar/AnyPS5/pull/7888) | `docs/dev/debt/shader.md` | | [PR 7922](https://www.github.com/boykopovar/AnyPS5/pull/7922) | `docs/dev/debt/shader.md` | | [PR 8004](https://www.github.com/boykopovar/AnyPS5/pull/8004) | `docs/dev/debt/shader.md` |
LeandroLP23 commented 2026-10-17 08:09:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-17T08:09:05Z.


Another AMD driver, since the description lists other AMD drivers as untested.

Windows 11 (26300), Radeon 860M (RDNA 3.5, 1002:1114), driver 32.0.13058.8001, WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1. Tree: main 17cfb1f4c with #7018, #7034, #7036, #7038, #7040, #7041 and #7042 merged together (only docs/dev/debt/shader.md conflicted, for #7040); "main" is the same tree with the six recompiler files reverted to main and the tests kept.

  • agc_driver_f64_add_mul_denormal_modes and the extended agc_driver_f64_rounding_denormal_modes: both fail on main, and pass 3 of 3 with this change.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231565434 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#issuecomment-6231565434). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-17T08:09:05Z. --- Another AMD driver, since the description lists other AMD drivers as untested. Windows 11 (26300), Radeon 860M (RDNA 3.5, `1002:1114`), driver 32.0.13058.8001, WinLibs GCC 15.2.0, Release, `ANYPS5_REQUIRE_VULKAN=1`. Tree: `main` `17cfb1f4c` with #7018, #7034, #7036, #7038, #7040, #7041 and #7042 merged together (only `docs/dev/debt/shader.md` conflicted, for #7040); "`main`" is the same tree with the six recompiler files reverted to `main` and the tests kept. - `agc_driver_f64_add_mul_denormal_modes` and the extended `agc_driver_f64_rounding_denormal_modes`: both fail on `main`, and pass 3 of 3 with this change. AI-assisted: yes (Claude Code).
jotitadev commented 2026-10-17 13:35:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-17T13:35:39Z.

Review: COMMENTED


An NVIDIA run, and lavapipe for the exposure @oneandonlydean raised about the new add/mul test.

Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. PR merged onto main 12a71f3f5 (clean). ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.

Run RTX 3070 lavapipe
^agc_driver_f64 (11 tests) pass 3/3 10/11: only agc_driver_f64_rounding_denormal_modes, inherited from #7036 (frexp of denormal inputs, details there)
agc_driver_f64_add_mul_denormal_modes with the recompiler files from main fails: v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000 same failure

With the test's Require changed locally to log and count instead of throwing, agc_driver_f64_add_mul_denormal_modes has 0 mismatches in every mode on both devices, including the kept-denormal rows (modes 1, 3 and no known float mode). On main it has 58 on each. So on this lavapipe the add/mul rows do not need a gate. Both devices report shaderDenormPreserveFloat64 = false, so a gate on that feature would skip these rows on NVIDIA too, where they pass.

Not run: Windows, AMD, any title.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5557979729 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#pullrequestreview-5557979729). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-17T13:35:39Z. **Review:** COMMENTED --- An NVIDIA run, and lavapipe for the exposure @oneandonlydean raised about the new add/mul test. **Machine:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. PR merged onto `main` `12a71f3f5` (clean). `ANYPS5_NO_SHADER_CACHE=1`, `-j1 --timeout 30`. | Run | RTX 3070 | lavapipe | |---|---|---| | `^agc_driver_f64` (11 tests) | pass 3/3 | 10/11: only `agc_driver_f64_rounding_denormal_modes`, inherited from #7036 (`frexp` of denormal inputs, details there) | | `agc_driver_f64_add_mul_denormal_modes` with the recompiler files from `main` | fails: `v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000` | same failure | With the test's `Require` changed locally to log and count instead of throwing, `agc_driver_f64_add_mul_denormal_modes` has 0 mismatches in every mode on both devices, including the kept-denormal rows (modes 1, 3 and no known float mode). On `main` it has 58 on each. So on this lavapipe the add/mul rows do not need a gate. Both devices report `shaderDenormPreserveFloat64 = false`, so a gate on that feature would skip these rows on NVIDIA too, where they pass. Not run: Windows, AMD, any title. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
UmillD commented 2026-10-17 13:45:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by UmillD on 2026-10-17T13:45:13Z.


Windows/NVIDIA validation of this PR, including its #7036 prerequisite.

  • GPU: NVIDIA GeForce RTX 5070 (10de:2f04, subgroup 32), driver 617.42 / 32.0.16.1742; Windows 11 Home Single Language 10.0.26300. CPU: Ryzen 7 9700X.
  • Pins: PR head 4369547aaf04f56b82d1cc580946d7b5d9c56f8b merged cleanly into main aa6424184adb46e60ae45c5593290c25eb52824b; integrated tree 09a57400a24482320e5bdad5d4132646c348be3b. No other PRs or local Astro Bot changes included.
  • Control: exactly the pinned main production sources, keeping the two new test fixtures. Same host, toolchain and configuration for both phases.
  • Build: GCC 15.2.0 r7 UCRT, Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF, offscreen test driver. Both selected-target builds succeeded.
  • Execution: ANYPS5_GPU="NVIDIA GeForce RTX 5070", ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, APS5_NO_PIPELINE_JOURNAL=1; CTest serial, 30 s timeout per case. Candidate used --repeat until-fail:3. The selected NVIDIA device is confirmed in every GPU run's full console log.
Test Main control (1 run) PR + #7036 (3 runs)
agc_driver_div_fixup_f64_denormal_modes PASS PASS 3/3
agc_driver_f64_add_mul_denormal_modes FAIL PASS 3/3
agc_driver_f64_arithmetic PASS PASS 3/3
agc_driver_f64_conversions PASS PASS 3/3
agc_driver_f64_division PASS PASS 3/3
agc_driver_f64_division_modifiers PASS PASS 3/3
agc_driver_f64_fma_subnormals PASS PASS 3/3
agc_driver_f64_nan_conversions PASS PASS 3/3
agc_driver_f64_rounding PASS PASS 3/3
agc_driver_f64_rounding_denormal_modes FAIL PASS 3/3
agc_driver_f64_transcendental PASS PASS 3/3
agc_driver_vopc_compare_f64 PASS PASS 3/3

The control failures were:

v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000
v_ceil_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 is 0x3ff0000000000000, expected 0x0000000000000000

Candidate: 36/36 GPU executions passed, zero skipped. The other ten selected GPU cases also passed on the control. agc_driver_graphics, agc_shader_memory, agc_shader_disk_cache and agc_recorder_device_selection passed once on each phase (4/4 per phase). No timeouts or memory-guard terminations occurred.

Scope: focused synthetic Windows/NVIDIA testing. This does not test games, performance, console hardware, the full suite, SPIRV-Tools validation, or the lavapipe issue raised above. The #7036/lavapipe follow-up remains outside this result; driver caches were not controlled.

AI-assisted testing and report: yes (Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234613732 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#issuecomment-6234613732). Originally posted by [UmillD](https://github.com/UmillD) on 2026-10-17T13:45:13Z. --- Windows/NVIDIA validation of this PR, including its #7036 prerequisite. - GPU: **NVIDIA GeForce RTX 5070** (`10de:2f04`, subgroup 32), driver **617.42 / 32.0.16.1742**; Windows 11 Home Single Language **10.0.26300**. CPU: Ryzen 7 9700X. - Pins: PR head `4369547aaf04f56b82d1cc580946d7b5d9c56f8b` merged cleanly into `main` `aa6424184adb46e60ae45c5593290c25eb52824b`; integrated tree `09a57400a24482320e5bdad5d4132646c348be3b`. No other PRs or local Astro Bot changes included. - Control: exactly the pinned main production sources, keeping the two new test fixtures. Same host, toolchain and configuration for both phases. - Build: GCC 15.2.0 r7 UCRT, Release, bundled dependencies, `BUILD_TESTING=ON`, `ANYPS5_ENABLE_SPIRV_TOOLS=OFF`, offscreen test driver. Both selected-target builds succeeded. - Execution: `ANYPS5_GPU="NVIDIA GeForce RTX 5070"`, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `APS5_NO_PIPELINE_JOURNAL=1`; CTest serial, 30 s timeout per case. Candidate used `--repeat until-fail:3`. The selected NVIDIA device is confirmed in every GPU run's full console log. | Test | Main control (1 run) | PR + #7036 (3 runs) | |---|---|---| | `agc_driver_div_fixup_f64_denormal_modes` | PASS | PASS 3/3 | | `agc_driver_f64_add_mul_denormal_modes` | FAIL | PASS 3/3 | | `agc_driver_f64_arithmetic` | PASS | PASS 3/3 | | `agc_driver_f64_conversions` | PASS | PASS 3/3 | | `agc_driver_f64_division` | PASS | PASS 3/3 | | `agc_driver_f64_division_modifiers` | PASS | PASS 3/3 | | `agc_driver_f64_fma_subnormals` | PASS | PASS 3/3 | | `agc_driver_f64_nan_conversions` | PASS | PASS 3/3 | | `agc_driver_f64_rounding` | PASS | PASS 3/3 | | `agc_driver_f64_rounding_denormal_modes` | FAIL | PASS 3/3 | | `agc_driver_f64_transcendental` | PASS | PASS 3/3 | | `agc_driver_vopc_compare_f64` | PASS | PASS 3/3 | The control failures were: ```text v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000 v_ceil_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 is 0x3ff0000000000000, expected 0x0000000000000000 ``` Candidate: **36/36 GPU executions passed, zero skipped**. The other ten selected GPU cases also passed on the control. `agc_driver_graphics`, `agc_shader_memory`, `agc_shader_disk_cache` and `agc_recorder_device_selection` passed once on each phase (4/4 per phase). No timeouts or memory-guard terminations occurred. Scope: focused synthetic Windows/NVIDIA testing. This does not test games, performance, console hardware, the full suite, SPIRV-Tools validation, or the lavapipe issue raised above. The #7036/lavapipe follow-up remains outside this result; driver caches were not controlled. AI-assisted testing and report: yes (Codex).
thuanquang commented 2026-10-17 19:00:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-17T19:00:25Z.


Rebased onto #7036's new head (which now gates its kept-denormal rows, see there), and 3221feb5a applies the same gate to agc_driver_f64_add_mul_denormal_modes: a mismatch in a kept-denormal mode is printed as skipped only when the device reports no f64 DenormPreserve, so on lavapipe and the RTX 3070, where @jotitadev saw those rows pass, they are still checked. RX 6700 XT, Windows: all 11 agc_driver_f64 tests pass. Merge order unchanged: #7036 first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6239098409 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#issuecomment-6239098409). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-17T19:00:25Z. --- Rebased onto #7036's new head (which now gates its kept-denormal rows, see there), and 3221feb5a applies the same gate to `agc_driver_f64_add_mul_denormal_modes`: a mismatch in a kept-denormal mode is printed as skipped only when the device reports no f64 `DenormPreserve`, so on lavapipe and the RTX 3070, where @jotitadev saw those rows pass, they are still checked. RX 6700 XT, Windows: all 11 `agc_driver_f64` tests pass. Merge order unchanged: #7036 first.
jotitadev commented 2026-10-18 00:05:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-18T00:05:19Z.

Review: COMMENTED


A rerun of head 3221feb5a (rebased onto #7036's gate) on the RTX 3070 and lavapipe from my earlier run.

Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8). Merged onto main 5de7a46e0 (clean). ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.

  • ^agc_driver_f64 (11 tests): RTX 3070 11/11 (3 runs), lavapipe 11/11 (2 runs).
  • agc_driver_f64_add_mul_denormal_modes prints no skipped line on either device, so the gate in 3221feb5a doesn't hide any row here. All add/mul rows are still checked.
  • With the three recompiler files from main, it fails on both devices: v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000.

The rounding test is covered in my rerun on #7036.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5560728695 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#pullrequestreview-5560728695). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-18T00:05:19Z. **Review:** COMMENTED --- A rerun of head `3221feb5a` (rebased onto #7036's gate) on the RTX 3070 and lavapipe from my earlier run. **Machine:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8). Merged onto `main` `5de7a46e0` (clean). `ANYPS5_NO_SHADER_CACHE=1`, `-j1 --timeout 30`. - `^agc_driver_f64` (11 tests): RTX 3070 11/11 (3 runs), lavapipe 11/11 (2 runs). - `agc_driver_f64_add_mul_denormal_modes` prints no `skipped` line on either device, so the gate in `3221feb5a` doesn't hide any row here. All add/mul rows are still checked. - With the three recompiler files from `main`, it fails on both devices: `v_add_f64 f64 denormal mode 0, IEEE mode on of 0x0000000000000001 and 0x0000000000000000 is 0x0000000000000001, expected 0x0000000000000000`. The rounding test is covered in my rerun on #7036. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
DavidAmsellem commented 2026-10-19 15:44:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T15:44:21Z.


First AMD-on-Linux (RADV) run of this PR. Merged onto main 43a2abaf7 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1638/1640 with this PR, against 1636/1638 on main. The failures are the same two on both, so this PR adds none: agc_driver_image_table_vouched_lookups (#7766, fixed by #7916) and agc_driver_guest_memory_lifetime (#7784). The new agc_driver_f64_add_mul_denormal_modes and agc_driver_f64_rounding_denormal_modes ran (not skipped) and passed.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6271203100 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7042#issuecomment-6271203100). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-19T15:44:21Z. --- First AMD-on-Linux (RADV) run of this PR. Merged onto `main` `43a2abaf7` (clean merge), built in full and compared with the same `main`, on the same machine. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`): **1638/1640 with this PR**, against 1636/1638 on `main`. The failures are the same two on both, so this PR adds none: `agc_driver_image_table_vouched_lookups` (#7766, fixed by #7916) and `agc_driver_guest_memory_lifetime` (#7784). The new `agc_driver_f64_add_mul_denormal_modes` and `agc_driver_f64_rounding_denormal_modes` ran (not skipped) and passed. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes
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!7042
No description provided.