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:
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user