gallivm/nir: add some f16 support
authorDave Airlie <airlied@redhat.com>
Mon, 24 Aug 2020 03:52:46 +0000 (13:52 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 31 Aug 2020 03:20:11 +0000 (13:20 +1000)
commit8f6eb35e0972e95127ab8ea984f915f7c3526544
tree10129667944539026d24ef4cbb021723a95a36d2
parentb31e8460a6bef37063bb9dfb55e4df3298cd533f
gallivm/nir: add some f16 support

GLSL lowers packhalf2x16 itself, but for SPIRV we don't have that
option.

For packing when NIR lowers it uses f2f16
and for unpack it needs the casting and f2f32

Fixes:
dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16*
dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
src/gallium/auxiliary/gallivm/lp_bld_nir.c