nir: Print the constant data size associated with a shader.
authorEric Anholt <eric@anholt.net>
Tue, 7 Jul 2020 19:48:09 +0000 (12:48 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Aug 2020 04:35:05 +0000 (04:35 +0000)
We should probably dump the constants, too, but this is useful to me for
now.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6179>

src/compiler/nir/nir_print.c

index 0e24a68402a48bd901c8623cdb3e9e7b7d27b822..7931a88cb20e40da814dfac5f9188ca9b7424432 100644 (file)
@@ -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);