freedreno/ir3: relax barriers
authorRob Clark <robdclark@gmail.com>
Sun, 3 Dec 2017 16:50:09 +0000 (11:50 -0500)
committerRob Clark <robdclark@gmail.com>
Sun, 3 Dec 2017 19:17:41 +0000 (14:17 -0500)
Instructions with no barrier_class can move wrt. an EVERYTHING barrier.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_sched.c

index 9492e9ba650156b088c3c3e77ac9624eebbf701c..5d0fcc481a753ffdba928ab472c0cc7099ddce03 100644 (file)
@@ -679,8 +679,8 @@ depends_on(struct ir3_instruction *instr, struct ir3_instruction *prior)
         * make accesses to unrelated objects not depend on each other (at
         * least as long as not declared coherent)
         */
-       if ((instr->barrier_class & IR3_BARRIER_EVERYTHING) ||
-                       (prior->barrier_class & IR3_BARRIER_EVERYTHING))
+       if (((instr->barrier_class & IR3_BARRIER_EVERYTHING) && prior->barrier_class) ||
+                       ((prior->barrier_class & IR3_BARRIER_EVERYTHING) && instr->barrier_class))
                return true;
        return !!(instr->barrier_class & prior->barrier_conflict);
 }