gallivm: fix half to float conversions with llvm 11
authorRoland Scheidegger <sroland@vmware.com>
Wed, 29 Apr 2020 04:38:12 +0000 (06:38 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Apr 2020 01:21:21 +0000 (01:21 +0000)
commit51a82ec3e437d1d2dc4c688578640d25b3e7f0a2
tree00f5a1f070b81cc9b6f7534c58d31010d06f7aaf
parentec6565bb2614afe605afae516a2f1dd8ada5bcad
gallivm: fix half to float conversions with llvm 11

LLVM 11 removes the intrinsic for half to float conversion, so use the fpext
function instead. This function actually works now with half to float, albeit
a quick experiment showed at least the x86 backend cannot lower it itself if
the cpu doesn't support it natively and tries to call external library, which
crashes (and would be very slow anyway as it would be lowered to scalar code),
so for now only use it where we previously used the f16c intrinsic.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2603
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4800>
src/gallium/auxiliary/gallivm/lp_bld_conv.c