summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-05-12 16:25:13 -0700
committerMarge Bot <eric+marge@anholt.net>2020-05-14 00:10:43 +0000
commitd2a0cde390001e70e7f9696f4ac7cbca9616cbdf (patch)
tree20bdd505940f236bd8c82ccf888d85d0dd8eee70
parent492d664be06ca538d4e5c1e380ab7966714a12a9 (diff)
nir: Include num_ubos in the printed shader (if nonzero).
I keep wanting this number for debugging shaders. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
-rw-r--r--src/compiler/nir/nir_print.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 6fc8fc9b5c1..e9b6b1097cd 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -1496,6 +1496,8 @@ nir_print_shader_annotated(nir_shader *shader, FILE *fp,
fprintf(fp, "inputs: %u\n", shader->num_inputs);
fprintf(fp, "outputs: %u\n", shader->num_outputs);
fprintf(fp, "uniforms: %u\n", shader->num_uniforms);
+ if (shader->info.num_ubos)
+ fprintf(fp, "ubos: %u\n", shader->info.num_ubos);
fprintf(fp, "shared: %u\n", shader->num_shared);
if (shader->scratch_size)
fprintf(fp, "scratch: %u\n", shader->scratch_size);