mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 06:50:22 +01:00
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:
parent
bf8e17d5bb
commit
87f89e4dec
1 changed files with 3 additions and 0 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue