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>
This commit is contained in:
Eric Anholt 2020-05-12 16:25:13 -07:00 committed by Marge Bot
parent 492d664be0
commit d2a0cde390
1 changed files with 2 additions and 0 deletions

View File

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