agx: require min alignment for load/store vectorize

fixes test_basic vload_constant

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
Alyssa Rosenzweig 2024-01-07 19:07:37 -04:00
parent 96cd467559
commit 355af1e903

View file

@ -2391,6 +2391,11 @@ mem_vectorize_cb(unsigned align_mul, unsigned align_offset, unsigned bit_size,
unsigned num_components, nir_intrinsic_instr *low,
nir_intrinsic_instr *high, void *data)
{
/* Must be aligned to the size of the load */
unsigned align = nir_combined_align(align_mul, align_offset);
if ((bit_size / 8) > align)
return false;
if (num_components > 4)
return false;