nir/lower_printf: fix array alignment

The pointer arithmetic doesn't need a 4byte alignment, otherwise
everything is broken.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38638>
This commit is contained in:
Lionel Landwerlin 2025-11-24 12:30:22 +02:00 committed by Marge Bot
parent 67faf6dfbd
commit d24633023f

View file

@ -84,7 +84,7 @@ lower_printf_intrin(nir_builder *b, nir_intrinsic_instr *prntf, void *_options)
*/ */
nir_deref_instr *buffer = nir_deref_instr *buffer =
nir_build_deref_cast(b, buffer_addr, nir_var_mem_global, nir_build_deref_cast(b, buffer_addr, nir_var_mem_global,
glsl_array_type(glsl_uint8_t_type(), 0, 4), 0); glsl_array_type(glsl_uint8_t_type(), 0, 1), 0);
/* Align the struct size to 4 */ /* Align the struct size to 4 */
nir_deref_instr *args = nir_src_as_deref(prntf->src[0]); nir_deref_instr *args = nir_src_as_deref(prntf->src[0]);