mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
lima/ppir: fix crash when program uses no registers at all
Program may need no regalloc at all, e.g. in case when program consists of single discard op. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Qiang Yu <yuq825@gmail.com>
This commit is contained in:
parent
b38dab101c
commit
5980565a37
1 changed files with 4 additions and 0 deletions
|
|
@ -747,6 +747,10 @@ bool ppir_regalloc_prog(ppir_compiler *comp)
|
|||
|
||||
ppir_regalloc_update_reglist_ssa(comp);
|
||||
|
||||
/* No registers? Probably shader consists of discard instruction */
|
||||
if (list_empty(&comp->reg_list))
|
||||
return true;
|
||||
|
||||
/* this will most likely succeed in the first
|
||||
* try, except for very complicated shaders */
|
||||
while (!ppir_regalloc_prog_try(comp, &spilled))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue