broadcom/compiler: fix DAG pre-remove for merged instructions
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 24 Feb 2021 10:22:16 +0000 (11:22 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 2 Mar 2021 06:56:00 +0000 (07:56 +0100)
commitb41edee879e33a8490230b771c955e7a5b0c99d3
tree8b796ea05e7997fefc552fcc54c0447ff9cd38ab
parentfd7d34f71676d58184ba841f73b816967ec63fef
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 <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>
src/broadcom/compiler/qpu_schedule.c