ir3: print branch sources

Now that branches are always inserted at the end of blocks, it's
convenient to see their sources when printed.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27411>
This commit is contained in:
Job Noorman 2024-02-01 14:51:17 +01:00 committed by Marge Bot
parent 846c813355
commit 7a66523124

View file

@ -374,24 +374,22 @@ print_instr(struct log_stream *stream, struct ir3_instruction *instr, int lvl)
mesa_log_stream_printf(stream, " ");
}
if (!is_flow(instr) || instr->opc == OPC_END || instr->opc == OPC_CHMASK) {
bool first = true;
foreach_dst (reg, instr) {
if (reg->wrmask == 0)
continue;
if (!first)
mesa_log_stream_printf(stream, ", ");
print_reg_name(stream, instr, reg, true);
first = false;
}
foreach_src_n (reg, n, instr) {
if (!first)
mesa_log_stream_printf(stream, ", ");
print_reg_name(stream, instr, reg, false);
if (instr->opc == OPC_END || instr->opc == OPC_CHMASK)
mesa_log_stream_printf(stream, " (%u)", instr->end.outidxs[n]);
first = false;
}
bool first = true;
foreach_dst (reg, instr) {
if (reg->wrmask == 0)
continue;
if (!first)
mesa_log_stream_printf(stream, ", ");
print_reg_name(stream, instr, reg, true);
first = false;
}
foreach_src_n (reg, n, instr) {
if (!first)
mesa_log_stream_printf(stream, ", ");
print_reg_name(stream, instr, reg, false);
if (instr->opc == OPC_END || instr->opc == OPC_CHMASK)
mesa_log_stream_printf(stream, " (%u)", instr->end.outidxs[n]);
first = false;
}
if (is_tex(instr) && !(instr->flags & IR3_INSTR_S2EN) &&