AGC: six tests fail on lavapipe from Mesa 26.1 on, which runs compute shaders with FTZ and DAZ (Mesa 76cdbcb9) #28761
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
mainb396d834cb. 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 0xfff0000000000000agc_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 0x04d0000000000000agc_driver_f64_fma_denormal_modesagc_driver_f64_trig_preop_denormal_modesagc_driver_f16_f64_output_modifier_zero:v_add_f64 mul:2 FLOAT_MODE 0x000000f0: lane 3 word 0 is 0x00000000, expected 0x00000001agc_driver_d16_depth_copy:the D16 to D24 encoding of code 129 does not match the quantized floatCause
Mesa commit 76cdbcb9 ("llvmpipe: disable denorms in compute shaders on x86/sse", April 2026).
lp_cs_tpool.cnow 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 neithershaderDenormPreserveFloat64norshaderDenormFlushToZeroFloat64(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
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 withANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1.Separately,
agc_driver_texture_sparse_levelsis 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.