From d24633023fce91f15a76041aa0e32b98421a5e8c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 24 Nov 2025 12:30:22 +0200 Subject: [PATCH] nir/lower_printf: fix array alignment The pointer arithmetic doesn't need a 4byte alignment, otherwise everything is broken. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_printf.c b/src/compiler/nir/nir_lower_printf.c index f8769972e76..cfe9b7c0252 100644 --- a/src/compiler/nir/nir_lower_printf.c +++ b/src/compiler/nir/nir_lower_printf.c @@ -84,7 +84,7 @@ lower_printf_intrin(nir_builder *b, nir_intrinsic_instr *prntf, void *_options) */ nir_deref_instr *buffer = 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 */ nir_deref_instr *args = nir_src_as_deref(prntf->src[0]);