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>
This commit is contained in:
@@ -1368,7 +1368,7 @@ bool combine_all_memory_barriers(nir_intrinsic_instr *a,
|
||||
|
||||
static nir_mem_access_size_align
|
||||
get_mem_access_size_align(nir_intrinsic_op intrin, uint8_t bytes,
|
||||
uint32_t align_mul, uint32_t align_offset,
|
||||
uint8_t bit_size, uint32_t align_mul, uint32_t align_offset,
|
||||
bool offset_is_const, const void *cb_data)
|
||||
{
|
||||
const uint32_t align = nir_combined_align(align_mul, align_offset);
|
||||
|
Reference in New Issue
Block a user