From 5760f92e08d712f0bbe39cb373935982284f2747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 4 Jul 2025 16:25:47 -0400 Subject: [PATCH] nir: print lowp/mediump/highp next to deref types Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_print.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 6aa54779ad8..00b9d8c8a29 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -1115,6 +1115,13 @@ print_deref_instr(nir_deref_instr *instr, print_state *state) fprintf(fp, "%s%s", get_variable_mode_str(1 << m, true), modes ? "|" : ""); } + + nir_variable *var = nir_deref_instr_get_variable(instr); + if (var) { + static const char *precision_str[] = {"", " highp", " mediump", " lowp"}; + fprintf(fp, "%s", precision_str[var->data.precision]); + } + fprintf(fp, " %s)", get_type_name(instr->type, state)); if (instr->deref_type == nir_deref_type_cast) {