freedreno/ir3: fix infinite recursion in sched
authorRob Clark <robclark@freedesktop.org>
Wed, 18 Mar 2015 13:51:57 +0000 (09:51 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 18 Mar 2015 14:42:33 +0000 (10:42 -0400)
One more case we need to handle.  One of the src instructions for the
indirect could also end up being ourself.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_sched.c

index c1921d04e4edf54a758cdfbcc27855621c9b0171..94237c33ff83347501d1493e26baa794d42aea0b 100644 (file)
@@ -283,7 +283,7 @@ static int trysched(struct ir3_sched_ctx *ctx,
                         * on ourself (ie. avoid infinite recursion):
                         */
                        foreach_ssa_src(src, indirect) {
-                               if (src == instr)
+                               if ((src == instr) || (src->address == instr))
                                        continue;
                                delay = trysched(ctx, src);
                                if (delay)