mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 14:30:22 +01:00
r600g/sb: Don't crash on empty if jump target
Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 608c7b4a63)
This commit is contained in:
parent
6f92f4dea9
commit
3f06559076
1 changed files with 4 additions and 1 deletions
|
|
@ -792,6 +792,9 @@ int bc_parser::prepare_if(cf_node* c) {
|
|||
assert(c->bc.addr-1 < cf_map.size());
|
||||
cf_node *c_else = NULL, *end = cf_map[c->bc.addr];
|
||||
|
||||
if (!end)
|
||||
return 0; // not quite sure how this happens, malformed input?
|
||||
|
||||
BCP_DUMP(
|
||||
sblog << "parsing JUMP @" << c->bc.id;
|
||||
sblog << "\n";
|
||||
|
|
@ -817,7 +820,7 @@ int bc_parser::prepare_if(cf_node* c) {
|
|||
if (c_else->parent != c->parent)
|
||||
c_else = NULL;
|
||||
|
||||
if (end->parent != c->parent)
|
||||
if (end && end->parent != c->parent)
|
||||
end = NULL;
|
||||
|
||||
region_node *reg = sh->create_region();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue