Module: Mesa
Branch: main
Commit: 6797b6ba45c811ea2c531beb866a98356c4d42e0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6797b6ba45c811ea2c531beb866a98356c4d42e0

Author: M Henning <[email protected]>
Date:   Thu Nov 23 14:18:20 2023 -0500

nak: Request alignment that matches the load width

Previously, this callback could try to set the requested alignment to
NIR_ALIGN_MUL_MAX, which would then overflow the u16 value in the
struct. We don't actually need that much alignment though, and this
value only really matters if we needed to increase alignment anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26347>

---

 src/nouveau/compiler/nak_nir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nouveau/compiler/nak_nir.c b/src/nouveau/compiler/nak_nir.c
index d3551571e84..0f60ff92382 100644
--- a/src/nouveau/compiler/nak_nir.c
+++ b/src/nouveau/compiler/nak_nir.c
@@ -1014,13 +1014,13 @@ nak_mem_access_size_align(nir_intrinsic_op intrin,
       return (nir_mem_access_size_align) {
          .bit_size = chunk_bytes * 8,
          .num_components = 1,
-         .align = align,
+         .align = chunk_bytes,
       };
    } else {
       return (nir_mem_access_size_align) {
          .bit_size = 32,
          .num_components = chunk_bytes / 4,
-         .align = align,
+         .align = chunk_bytes,
       };
    }
 }

Reply via email to