diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2015-06-10 01:46:13 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2015-06-11 11:17:52 -0700 |
commit | f4310cdbd08f20276237fbefa3eba406aa109636 (patch) | |
tree | eb56b95dd92c8a921290b9a2e2f7038b3518b971 /src | |
parent | 1a6e4f46ed117b393e26aff326e5b05d4aea7fb0 (diff) | |
download | external_mesa3d-f4310cdbd08f20276237fbefa3eba406aa109636.zip external_mesa3d-f4310cdbd08f20276237fbefa3eba406aa109636.tar.gz external_mesa3d-f4310cdbd08f20276237fbefa3eba406aa109636.tar.bz2 |
i965: Re-index SSA definitions before printing NIR code.
This makes the SSA definitions use sequential numbers (0, 1, 2, ...)
instead of seemingly random ones. There's not much point normally,
but it makes debug output much easier to read.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 142162c..c13708a 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -167,6 +167,12 @@ brw_create_nir(struct brw_context *brw, nir_validate_shader(nir); if (unlikely(debug_enabled)) { + /* Re-index SSA defs so we print more sensible numbers. */ + nir_foreach_overload(nir, overload) { + if (overload->impl) + nir_index_ssa_defs(overload->impl); + } + fprintf(stderr, "NIR (SSA form) for %s shader:\n", _mesa_shader_stage_to_string(stage)); nir_print_shader(nir, stderr); |