gallivm: fix texture-mapping with 16-bit result
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 17 Aug 2021 13:30:39 +0000 (15:30 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Aug 2021 07:55:34 +0000 (07:55 +0000)
commit45a61f1782561da9a7905bf584cd188d7b108c98
tree54cd077fe84e6fb3aed3291a19ca71dd24102f33
parentfae1e99a15d12b82f65c77c90425335fec7562f1
gallivm: fix texture-mapping with 16-bit result

16bit integer support also implies using 16-bit results when sampling
textures.

Because we're returning the results in float SSA values instead of int,
we need to bitcast back to integers before truncating the values.

Fixes: 00ff60f799c ("gallivm: add 16-bit integer support")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12413>
src/gallium/auxiliary/gallivm/lp_bld_nir.c
src/gallium/drivers/llvmpipe/ci/deqp-llvmpipe-fails.txt