mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
broadcom/compiler: handle moving last ubo load in the block correctly
Before we move a UBO load to a previous location in the block we take a reference to the instruction after it so we can continue the loop from there, however, if the load we just moved was already the last instruction in the block we just want to break the loop right there. Fixes crashes with shaders from http://flightradar24.com Fixes:8998666de7("broadcom/compiler: sort constant UBO loads by index and offset") Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35333> (cherry picked from commitc059c721fb)
This commit is contained in:
parent
260b5112f4
commit
39603d3b9d
2 changed files with 5 additions and 1 deletions
|
|
@ -134,7 +134,7 @@
|
|||
"description": "broadcom/compiler: handle moving last ubo load in the block correctly",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "8998666de7e827f5fe62b51186c7f81d362a2be1",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1541,6 +1541,10 @@ v3d_nir_sort_constant_ubo_load(nir_block *block, nir_intrinsic_instr *ref)
|
|||
exec_node_insert_after(&pos->node, &inst->node);
|
||||
|
||||
progress = true;
|
||||
|
||||
/* If this was the last instruction in the block we are done */
|
||||
if (!next_inst)
|
||||
break;
|
||||
}
|
||||
|
||||
return progress;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue