From 13b3c401a417c6d1a409c0b85cd97a093696c96a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 7 Jul 2020 12:48:09 -0700 Subject: [PATCH] nir: Print the constant data size associated with a shader. We should probably dump the constants, too, but this is useful to me for now. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Rob Clark Part-of: --- src/compiler/nir/nir_print.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 0e24a68402a..7931a88cb20 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -1517,6 +1517,8 @@ nir_print_shader_annotated(nir_shader *shader, FILE *fp, fprintf(fp, "shared: %u\n", shader->num_shared); if (shader->scratch_size) fprintf(fp, "scratch: %u\n", shader->scratch_size); + if (shader->constant_data_size) + fprintf(fp, "constants: %u\n", shader->constant_data_size); nir_foreach_variable_in_shader(var, shader) print_var_decl(var, &state); -- 2.30.2