From 252e55a1bb0b9f7829230368e47a119122ae7ba5 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 16 Dec 2025 17:25:29 +0200 Subject: [PATCH] nir/printf-helpers: set writes_memory at printf emission Those helpers can be called late (since it's mostly for debug purposes). This can avoid surprises in the backend and also avoids rerunning gather_info. Signed-off-by: Lionel Landwerlin Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_lower_printf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_printf.c b/src/compiler/nir/nir_lower_printf.c index 098ecd47e75..3263c001691 100644 --- a/src/compiler/nir/nir_lower_printf.c +++ b/src/compiler/nir/nir_lower_printf.c @@ -293,6 +293,8 @@ nir_vprintf_fmt(nir_builder *b, unsigned ptr_bit_size, const char *fmt, va_list * cache while debugging compiler issues is a good practice anyway. */ u_printf_singleton_add(&info, 1); + + b->shader->info.writes_memory = true; } void