nir: introduce and use nir_component_mask
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 24 Mar 2022 09:36:06 +0000 (10:36 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 19 Apr 2022 06:54:47 +0000 (06:54 +0000)
commitff05137c2dbf9c6b8e5d4ce31063516e5c04569f
tree4dd396f5417081d71eb82df1c5ec2b59aaf9fe31
parentbe952e71a70bb6ac1afde8876e4615b287bd4089
nir: introduce and use nir_component_mask

The BITFIELD_MASK() macro is intended for using with actual bitfields,
not with nir_component_mask_t. This means we do some extra work to
handle values that are invalid for nir_component_mask_t in the first
place.

This eliminates some warnings on Clang, where the compiler complains
about casting UINT32_MAX to UINT16_MAX.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15547>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_blend.c
src/compiler/nir/nir_lower_input_attachments.c
src/compiler/nir/nir_lower_non_uniform_access.c
src/compiler/nir/nir_lower_subgroups.c
src/compiler/nir/nir_opt_copy_prop_vars.c
src/compiler/spirv/spirv_to_nir.c