From 0a718c9354c2ed66ccb0f8c70883f2738ee71471 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 14 Apr 2023 13:07:32 +0200 Subject: [PATCH] nir: clean up white-space in deref-printing Without this, we get some trailing spaces in some cases, and some double space in some other cases. Let's clean that up a bit. Reviewed-by: Lionel Landwerlin Reviewed-by: Iago Toral Quiroga Acked-by: Faith Ekstrand Part-of: --- src/compiler/nir/nir_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 05ad3f3..edab512 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -850,12 +850,12 @@ print_deref_instr(nir_deref_instr *instr, print_state *state) fprintf(fp, "%s%s", get_variable_mode_str(1 << m, true), modes ? "|" : ""); } - fprintf(fp, " %s) ", glsl_get_type_name(instr->type)); + fprintf(fp, " %s)", glsl_get_type_name(instr->type)); if (instr->deref_type != nir_deref_type_var && instr->deref_type != nir_deref_type_cast) { /* Print the entire chain as a comment */ - fprintf(fp, "/* &"); + fprintf(fp, " /* &"); print_deref_link(instr, true, state); fprintf(fp, " */"); } -- 2.7.4