Module: Mesa
Branch: master
Commit: b41edee879e33a8490230b771c955e7a5b0c99d3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b41edee879e33a8490230b771c955e7a5b0c99d3

Author: Iago Toral Quiroga <[email protected]>
Date:   Wed Feb 24 11:22:16 2021 +0100

broadcom/compiler: fix DAG pre-remove for merged instructions

When selecting an instruction to merge, we want to pre-remove that
instruction from the DAG, not the one we are merging it in, which
we had already pre-removed right before.

The reason this was not causing problems before is that the
consequence of this bug is we will choose the same instruction
again in the merge loop and trying to merge that instruction twice
will fail and we would break out of the merge loop and move on.

Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>

---

 src/broadcom/compiler/qpu_schedule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/broadcom/compiler/qpu_schedule.c 
b/src/broadcom/compiler/qpu_schedule.c
index 10ee1a33e30..4d23a80c15a 100644
--- a/src/broadcom/compiler/qpu_schedule.c
+++ b/src/broadcom/compiler/qpu_schedule.c
@@ -1512,7 +1512,7 @@ schedule_instructions(struct v3d_compile *c,
                                                                scoreboard,
                                                                chosen))) {
                                 time = MAX2(merge->unblocked_time, time);
-                                pre_remove_head(scoreboard->dag, chosen);
+                                pre_remove_head(scoreboard->dag, merge);
                                 list_addtail(&merge->link, &merged_list);
                                 (void)qpu_merge_inst(devinfo, inst,
                                                      inst, &merge->inst->qpu);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to