diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-27 20:35:00 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-29 15:35:54 +0000 |
commit | d8d7df6f09acb7220c35323449d512146a7cc06d (patch) | |
tree | 753c247f2f8ff2d3bfea0e3d0182322efc91ca43 /src/panfrost/midgard/midgard_print.c | |
parent | e27fd4b3eccff8fcea2dd381f73bdd1d96075a7d (diff) |
pan/mdg: Don't crash on unknown branch target
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793>
Diffstat (limited to 'src/panfrost/midgard/midgard_print.c')
-rw-r--r-- | src/panfrost/midgard/midgard_print.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c index 14b99d69f49..89b853ce3cb 100644 --- a/src/panfrost/midgard/midgard_print.c +++ b/src/panfrost/midgard/midgard_print.c @@ -298,7 +298,8 @@ mir_print_instruction(midgard_instruction *ins) if (ins->branch.target_type != TARGET_DISCARD) printf(" %s -> block(%d)\n", - branch_target_names[ins->branch.target_type], + ins->branch.target_type < 4 ? + branch_target_names[ins->branch.target_type] : "??", ins->branch.target_block); return; |