agc_driver_f64_fma_subnormals: f64 subnormal results are flushed to zero (Mesa ANV, lavapipe) #2860

Closed
opened 2026-10-10 16:48:31 +00:00 by ThatsLeo · 1 comment
ThatsLeo commented 2026-10-10 16:48:31 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-10T16:48:31Z.


agc_driver_f64_fma_subnormals fails on Intel Arc (Meteor Lake, Mesa 26.2.3 ANV) and on lavapipe:

v_fma_f64: lane 0 (0xaf909f1570e40fb2, 0x10697a78dd1df49b, 0x8000000000000000) is 0x8000000000000000, expected 0x800d3be6095b3463

Shaders declare DenormPreserve only for 16-bit floats, so f64 subnormal behaviour is left to the driver, and both flush the subnormal result. Intel Arc reports shaderDenormPreserveFloat64; lavapipe does not.

Fix: ThatsLeo/AnyPS5:fix/shader-f64-denorm-preserve (one commit, 7df6c709, on main 57f96fd2).

  • SpirvTarget::float64DenormPreserve, set from shaderDenormPreserveFloat64, makes shaders with f64 instructions declare DenormPreserve 64. It follows narrowSubgroupClock: cache key, request serialization (version 16), agc_shader_disk_cache and agc_shader_memory cover it.
  • Without the device property the test is skipped, recorded in TechnicalDebt next to the v_fma_f64 entry.

Tested: Fedora 44, GCC 16.2.1, Release. The test passes on Intel Arc and is skipped on lavapipe. Full ctest on main (57f96fd2), on this branch and with all eight fixes listed in #2803-#2807 and here, on Intel Arc and lavapipe: no new failure. With all of them and #1250, all 698 tests pass on Intel Arc and on lavapipe. Dreaming Sarah (PPSA02929) runs with no visual difference.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5793289191 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2860). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-10T16:48:31Z. --- `agc_driver_f64_fma_subnormals` fails on Intel Arc (Meteor Lake, Mesa 26.2.3 ANV) and on lavapipe: ``` v_fma_f64: lane 0 (0xaf909f1570e40fb2, 0x10697a78dd1df49b, 0x8000000000000000) is 0x8000000000000000, expected 0x800d3be6095b3463 ``` Shaders declare `DenormPreserve` only for 16-bit floats, so f64 subnormal behaviour is left to the driver, and both flush the subnormal result. Intel Arc reports `shaderDenormPreserveFloat64`; lavapipe does not. **Fix:** [`ThatsLeo/AnyPS5:fix/shader-f64-denorm-preserve`](https://github.com/ThatsLeo/AnyPS5/tree/fix/shader-f64-denorm-preserve) (one commit, `7df6c709`, on `main` `57f96fd2`). - `SpirvTarget::float64DenormPreserve`, set from `shaderDenormPreserveFloat64`, makes shaders with f64 instructions declare `DenormPreserve` 64. It follows `narrowSubgroupClock`: cache key, request serialization (version 16), `agc_shader_disk_cache` and `agc_shader_memory` cover it. - Without the device property the test is skipped, recorded in TechnicalDebt next to the `v_fma_f64` entry. **Tested:** Fedora 44, GCC 16.2.1, Release. The test passes on Intel Arc and is skipped on lavapipe. Full `ctest` on `main` (`57f96fd2`), on this branch and with all eight fixes listed in #2803-#2807 and here, on Intel Arc and lavapipe: no new failure. With all of them and #1250, all 698 tests pass on Intel Arc and on lavapipe. Dreaming Sarah (PPSA02929) runs with no visual difference. AI-assisted: yes.
Silverash-i8 commented 2026-10-10 17:29:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-10T17:29:52Z.


Checked this on Windows with the Intel driver: Core Ultra 9 275HX (Arrow Lake, driver 32.0.101.8991), WinLibs GCC 15.2.0 r7, Release, 7df6c709 on main 57f96fd2, in the same stack I describe on #2861.

This iGPU has no shaderFloat64 at all, so agc_driver_f64_fma_subnormals now skips (float64DenormPreserve is false), where on main it fails because Float64 is missing. Nothing else in the full run changed because of it.

The skip here covers the same case as the F64FmaSubnormals.cpp half of my fix/agc-tests-skip-without-float64 (7217a416), so that part of mine is redundant. The other half is still needed: agc_driver_fp16_overflow uses f64 instructions too, and without a skip it fails on this device with 64-bit float instructions need the Float64 capability, which the device lacks.

AI-assisted (Claude Code); I ran everything above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100264995 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2860#issuecomment-6100264995). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-10T17:29:52Z. --- Checked this on Windows with the Intel driver: Core Ultra 9 275HX (Arrow Lake, driver 32.0.101.8991), WinLibs GCC 15.2.0 r7, Release, `7df6c709` on `main` `57f96fd2`, in the same stack I describe on #2861. This iGPU has no `shaderFloat64` at all, so `agc_driver_f64_fma_subnormals` now skips (`float64DenormPreserve` is false), where on `main` it fails because Float64 is missing. Nothing else in the full run changed because of it. The skip here covers the same case as the `F64FmaSubnormals.cpp` half of my `fix/agc-tests-skip-without-float64` (`7217a416`), so that part of mine is redundant. The other half is still needed: `agc_driver_fp16_overflow` uses f64 instructions too, and without a skip it fails on this device with `64-bit float instructions need the Float64 capability, which the device lacks`. AI-assisted (Claude Code); I ran everything above on my machine.
Sign in to join this conversation.
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#2860
No description provided.