Mesa (master): nir: Print the constant data size associated with a shader.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 5 05:03:29 UTC 2020


Module: Mesa
Branch: master
Commit: 13b3c401a417c6d1a409c0b85cd97a093696c96a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13b3c401a417c6d1a409c0b85cd97a093696c96a

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jul  7 12:48:09 2020 -0700

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 <alyssa.rosenzweig at collabora.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6179>

---

 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);



More information about the mesa-commit mailing list