pan/midgard: Fix recursive csel scheduling
[mesa.git] / src / panfrost / midgard / midgard_schedule.c
index 2106d0d1aceaeb07d1652f98888d69790596b98b..f369b09e2ab7c928063e5097998e8a8fe4a37983 100644 (file)
@@ -669,6 +669,10 @@ mir_comparison_mobile(
                 if (instructions[i]->type != TAG_ALU_4)
                         return ~0;
 
+                /* If it would itself require a condition, that's recursive */
+                if (OP_IS_CSEL(instructions[i]->alu.op))
+                        return ~0;
+
                 /* We'll need to rewrite to .w but that doesn't work for vector
                  * ops that don't replicate (ball/bany), so bail there */