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>
This commit is contained in:
parent
1a6e4f46ed
commit
f4310cdbd0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue