From 3535797e8c991d5159871f1517fde107b6990a96 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 4 Mar 2020 11:54:26 -0800 Subject: [PATCH] nir/print: show variable precision Signed-off-by: Rob Clark Part-of: --- src/compiler/nir/nir_print.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index d4bc70a6aef..41a60aeefa5 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -478,6 +478,16 @@ print_var_decl(nir_variable *var, print_state *state) fprintf(fp, "%s ", util_format_short_name(var->data.image.format)); } + if (var->data.precision) { + const char *precisions[] = { + "", + "highp", + "mediump", + "lowp", + }; + fprintf(fp, "%s ", precisions[var->data.precision]); + } + fprintf(fp, "%s %s", glsl_get_type_name(var->type), get_var_name(var, state)); -- 2.30.2