glsl_to_nir: Fix NIR bit-size of ir_triop_bitfield_extract and ir_quadop_bitfield_insert
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 8 Nov 2022 21:53:25 +0000 (13:53 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 06:23:21 +0000 (06:23 +0000)
commit43da8223121b8807d2dd7fcf1276d145242365e6
tree72ddb05705fb9aee7a77a88d9722683dd589561c
parent1fae751d493248ce6c29cb155a8178f5850b9a98
glsl_to_nir: Fix NIR bit-size of ir_triop_bitfield_extract and ir_quadop_bitfield_insert

Previously these would return result->bit_size of 32 even though the
type might have been int16_t or uint16_t.  This prevents many assertion
failures in "glsl: Use nir_type_convert instead of
nir_type_conversion_op" on zink.

Fixes: 5e922fbc160 ("glsl_to_nir: fix bitfield_extract with 16-bit operands")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15121>
src/compiler/glsl/glsl_to_nir.cpp