AGC: six tests fail on lavapipe from Mesa 26.1 on, which runs compute shaders with FTZ and DAZ (Mesa 76cdbcb9) #28761

Open
opened 2026-12-03 10:58:06 +00:00 by Stan2032 · 0 comments
Stan2032 commented 2026-12-03 10:58:06 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Stan2032 on 2026-12-03T10:58:06Z.


What happens

On lavapipe built from Mesa 26.2.6 or from Mesa main (2f052e90), these tests fail on AnyPS5 main b396d834cb. With Ubuntu 24.04's lavapipe (Mesa 25.2.8) they pass:

  • agc_driver_f64_arithmetic_nan: v_mul_f64 -v[4:5] |v[6:7]| of 0x7ff0000000000000 and 0x0000000000000001 is 0xfff8000000000000, expected 0xfff0000000000000
  • agc_driver_f64_div_scale_denormal_modes: v_div_scale_f64 without a known float mode of div_scale(value, value, num) with 0x0000000000000001 and 0x3ff0000000000000 is 0x0400000000000000, expected 0x04d0000000000000
  • agc_driver_f64_fma_denormal_modes
  • agc_driver_f64_trig_preop_denormal_modes
  • agc_driver_f16_f64_output_modifier_zero: v_add_f64 mul:2 FLOAT_MODE 0x000000f0: lane 3 word 0 is 0x00000000, expected 0x00000001
  • agc_driver_d16_depth_copy: the D16 to D24 encoding of code 129 does not match the quantized float

Cause

Mesa commit 76cdbcb9 ("llvmpipe: disable denorms in compute shaders on x86/sse", April 2026). lp_cs_tpool.c now sets MXCSR FTZ (and DAZ, where the CPU has it) for every compute job that isn't an OpenCL kernel. So Vulkan compute shaders read denormal inputs as zero and flush denormal results, f64 included. lavapipe reports neither shaderDenormPreserveFloat64 nor shaderDenormFlushToZeroFloat64 (25.2.8 and 26.2.6 alike), so the spec allows this.

With that one condition disabled in a local lavapipe build, all six pass again.

Where it shows up

  • CI isn't failing yet. The Linux job uses the runner's own lavapipe, and Ubuntu 24.04's 25.2.8 passes. The Windows job unpacks lavapipe 26.2.6 only for non-PR runs, and registers it for the video output tests only. Linux CI will hit this when its runner's Mesa reaches 26.1.
  • Anyone testing on lavapipe from Mesa 26.1 or later sees these six fail on main. A tester in #22446 already runs llvmpipe from Mesa 26.2.7.

Possible direction

The f64 add/mul, div_scale, fma and ldexp tests already skip some results with "the device flushes f64 denormals without DenormPreserve support". On these builds some div_scale and fma rows still fail despite that, and the other four tests have no such skip. A skip that also covers devices reading denormal inputs as zero, or a startup probe of whether compute shaders flush, could handle these. I haven't written one. The open f64 PRs I checked (#22034, #22446, #26101, #27859, #28479, #11483) touch other test files.

Environment: Linux, Intel Xeon (AVX2, DAZ), LLVM 20.1.2, lavapipe built from mesa-26.2.6 (8e87a503e) and from main 2f052e90, release builds. Tests run through ctest with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1.

Separately, agc_driver_texture_sparse_levels is skipped on 25.2.8 but fails on both newer builds. I haven't looked into it, and it isn't caused by the change above.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6766854842 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/28761). Originally posted by [Stan2032](https://github.com/Stan2032) on 2026-12-03T10:58:06Z. --- ### What happens On lavapipe built from Mesa 26.2.6 or from Mesa main (2f052e90), these tests fail on AnyPS5 `main` b396d834cb0. With Ubuntu 24.04's lavapipe (Mesa 25.2.8) they pass: - `agc_driver_f64_arithmetic_nan`: `v_mul_f64 -v[4:5] |v[6:7]| of 0x7ff0000000000000 and 0x0000000000000001 is 0xfff8000000000000, expected 0xfff0000000000000` - `agc_driver_f64_div_scale_denormal_modes`: `v_div_scale_f64 without a known float mode of div_scale(value, value, num) with 0x0000000000000001 and 0x3ff0000000000000 is 0x0400000000000000, expected 0x04d0000000000000` - `agc_driver_f64_fma_denormal_modes` - `agc_driver_f64_trig_preop_denormal_modes` - `agc_driver_f16_f64_output_modifier_zero`: `v_add_f64 mul:2 FLOAT_MODE 0x000000f0: lane 3 word 0 is 0x00000000, expected 0x00000001` - `agc_driver_d16_depth_copy`: `the D16 to D24 encoding of code 129 does not match the quantized float` ### Cause Mesa commit [76cdbcb9](https://gitlab.freedesktop.org/mesa/mesa/-/commit/76cdbcb9) ("llvmpipe: disable denorms in compute shaders on x86/sse", April 2026). `lp_cs_tpool.c` now sets MXCSR FTZ (and DAZ, where the CPU has it) for every compute job that isn't an OpenCL kernel. So Vulkan compute shaders read denormal inputs as zero and flush denormal results, f64 included. lavapipe reports neither `shaderDenormPreserveFloat64` nor `shaderDenormFlushToZeroFloat64` (25.2.8 and 26.2.6 alike), so the spec allows this. With that one condition disabled in a local lavapipe build, all six pass again. ### Where it shows up - CI isn't failing yet. The Linux job uses the runner's own lavapipe, and Ubuntu 24.04's 25.2.8 passes. The Windows job unpacks lavapipe 26.2.6 only for non-PR runs, and registers it for the video output tests only. Linux CI will hit this when its runner's Mesa reaches 26.1. - Anyone testing on lavapipe from Mesa 26.1 or later sees these six fail on `main`. A tester in #22446 already runs llvmpipe from Mesa 26.2.7. ### Possible direction The f64 add/mul, div_scale, fma and ldexp tests already skip some results with "the device flushes f64 denormals without DenormPreserve support". On these builds some div_scale and fma rows still fail despite that, and the other four tests have no such skip. A skip that also covers devices reading denormal inputs as zero, or a startup probe of whether compute shaders flush, could handle these. I haven't written one. The open f64 PRs I checked (#22034, #22446, #26101, #27859, #28479, #11483) touch other test files. **Environment:** Linux, Intel Xeon (AVX2, DAZ), LLVM 20.1.2, lavapipe built from `mesa-26.2.6` (8e87a503e) and from main 2f052e90, release builds. Tests run through ctest with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. Separately, `agc_driver_texture_sparse_levels` is skipped on 25.2.8 but fails on both newer builds. I haven't looked into it, and it isn't caused by the change above. AI-assisted: yes.
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#28761
No description provided.