pan/bi: Make sure global loads/stores don't exceed 16 bytes

This is the granularity of global loads/stores. Since all other type
of memory accesses have the same or even smaller constraints, we don't
even bother testing the intrinsic type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29670>
This commit is contained in:
Boris Brezillon 2024-06-07 12:43:15 +02:00
parent bf8e17d5bb
commit 87f89e4dec

View file

@ -4455,6 +4455,9 @@ mem_access_size_align_cb(nir_intrinsic_op intrin, uint8_t bytes,
uint32_t align = nir_combined_align(align_mul, align_offset);
assert(util_is_power_of_two_nonzero(align));
/* No more than 16 bytes at a time. */
bytes = MIN2(bytes, 16);
/* If the number of bytes is a multiple of 4, use 32-bit loads. Else if it's
* a multiple of 2, use 16-bit loads. Else use 8-bit loads.
*/