pan/bi: Allow printing branches without targets

Useful for debugging codegen.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
This commit is contained in:
Alyssa Rosenzweig
2020-05-27 18:09:44 -04:00
committed by Marge Bot
parent a4fc16a1d4
commit b34eb94d9c
+5 -2
View File
@@ -402,8 +402,11 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
}
if (ins->type == BI_BRANCH) {
assert(ins->branch_target);
fprintf(fp, "-> block%u", ins->branch_target->base.name);
if (ins->branch_target) {
fprintf(fp, "-> block%u", ins->branch_target->base.name);
} else {
fprintf(fp, "-> void");
}
} else if (ins->type == BI_TEX) {
bi_print_texture(&ins->texture, fp);
}