nir_lower_mem_access_bit_sizes: Add a bit_size input to the callback
authorJesse Natalie <jenatali@microsoft.com>
Mon, 22 May 2023 16:49:23 +0000 (09:49 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Jun 2023 00:43:36 +0000 (00:43 +0000)
commit4217353e2d1d97dc3beb57015e43b8f53f09069e
tree70808efaef63fd13d425709e6be4238b7b747ee7
parente77fe70b1e31f0d370cf1525484b6e4379b280db
nir_lower_mem_access_bit_sizes: Add a bit_size input to the callback

We'd like to use this callback to adjust loads and stores from things
that are unsupported to things that are supported, but if the input
is already supported, we'd prefer not to change it. Rather than making
up a bit size that'd work and doing a bunch of pack/unpack bit math,
only return a different bit size if the input one doesn't work for us
(i.e. can't load enough memory or just an unsupported size entirely).

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23173>
src/asahi/compiler/agx_compile.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_mem_access_bit_sizes.c
src/intel/compiler/brw_nir.c
src/panfrost/compiler/bifrost_compile.c