You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mesa ANV: v_cmp_*_f16 treats f16 subnormals as zero (agc_driver_vopc_compare) #2861
agc_driver_vopc_compare fails on Intel Arc (Meteor Lake, Mesa 26.2.3 ANV), as reported for other Intel GPUs in #2114:
vopc compares: thread 0 compare 36 is 0, expected 1
Every failing compare has an f16 subnormal operand (0x0001): -0 < 0x0001 and 0 < 0x0001 come out false. EmitF16BitsToF32 widens halves with UnpackHalf2x16, which may flush subnormals, and ANV does.
Fix:ThatsLeo/AnyPS5:fix/shader-f16-subnormal-widen (one commit, e59865e0, on main57f96fd2). A subnormal half is converted as its fraction times 2^-24 with its sign, which is exact in f32; other halves still go through UnpackHalf2x16. All callers of EmitF16BitsToF32 get the exact conversion.
Tested: Fedora 44, GCC 16.2.1, Release. agc_driver_vopc_compare passes on Intel Arc and 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.
Tested this on the Windows Intel driver too, since it's the same failure I reported in #2822 for Arrow Lake.
Windows 11, WinLibs GCC 15.2.0 r7, Release, Intel Graphics in a Core Ultra 9 275HX (Arrow Lake, driver 32.0.101.8991), ANYPS5_GPU=Intel. On main57f96fd2 I stacked e59865e0 (this) and 7df6c709 (#2860) with the other Intel fixes (#2777's 758eeb9f, #2815's 377829ec, the LDS lock change from #2805, #1250 for vop1_float_unary), plus the fp16_overflow skip from my 7217a416:
So both fixes work on Arrow Lake. The difference is that #2822 adds DenormPreserve 16 to UnpackHalf2x16 and only applies where the device has Float16, RoundingModeRTE and DenormPreserve, while this one converts subnormals exactly everywhere, at the cost of a few extra instructions per widen. Since this one doesn't depend on device support, I'd be happy for it to be the one that goes in, and I'll close #2822 if the maintainers agree.
AI-assisted (Claude Code); I ran everything above on my machine.
Closing as a duplicate of #2822. Your exact widening (e59865e0) and test results would be useful there; #1463 (open) takes the same integer-decode route.
Activity
Silverash-i8 commentedon Oct 10, 2026
Tested this on the Windows Intel driver too, since it's the same failure I reported in #2822 for Arrow Lake.
Windows 11, WinLibs GCC 15.2.0 r7, Release, Intel Graphics in a Core Ultra 9 275HX (Arrow Lake, driver 32.0.101.8991),
ANYPS5_GPU=Intel. Onmain57f96fd2I stackede59865e0(this) and7df6c709(#2860) with the other Intel fixes (#2777's758eeb9f, #2815's377829ec, the LDS lock change from #2805, #1250 forvop1_float_unary), plus thefp16_overflowskip from my7217a416:agc_driver_vopc_comparepasses.ctest -j6: 2 failures out of 709 (46 skipped on this device). One wasagc_driver_gated_dispatch_capture, the timing flake from AGC: WAIT_REG_MEM gives up after 1 s while the awaited label is still pending on another queue, so gated work reads too early #2832, which passes on its own. The other waspatched_libraries, which passes on a re-run and doesn't touch shaders.So both fixes work on Arrow Lake. The difference is that #2822 adds
DenormPreserve 16toUnpackHalf2x16and only applies where the device has Float16, RoundingModeRTE and DenormPreserve, while this one converts subnormals exactly everywhere, at the cost of a few extra instructions per widen. Since this one doesn't depend on device support, I'd be happy for it to be the one that goes in, and I'll close #2822 if the maintainers agree.AI-assisted (Claude Code); I ran everything above on my machine.
oneandonlydean commentedon Oct 10, 2026
Closing as a duplicate of #2822. Your exact widening (
e59865e0) and test results would be useful there; #1463 (open) takes the same integer-decode route.