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>
This commit is contained in:
M Henning
2023-11-23 14:18:20 -05:00
committed by Marge Bot
parent b7517aec9e
commit 6797b6ba45
+2 -2
View File
@@ -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,
};
}
}