From e6008d0910349853d2fec8ee18fdbf144996d2c6 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: (cherry picked from commit d24633023fce91f15a76041aa0e32b98421a5e8c) --- .pick_status.json | 2 +- src/compiler/nir/nir_lower_printf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index b6fe0c75b26..404425c80c1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2394,7 +2394,7 @@ "description": "nir/lower_printf: fix array alignment", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/compiler/nir/nir_lower_printf.c b/src/compiler/nir/nir_lower_printf.c index 4ae1418a9ee..677c3061321 100644 --- a/src/compiler/nir/nir_lower_printf.c +++ b/src/compiler/nir/nir_lower_printf.c @@ -85,7 +85,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]);