From: Rob Clark Date: Wed, 18 Mar 2015 13:51:57 +0000 (-0400) Subject: freedreno/ir3: fix infinite recursion in sched X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aee26d292f165438577426f5e62a62ec2a1514c9;p=mesa.git freedreno/ir3: fix infinite recursion in sched 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 --- diff --git a/src/gallium/drivers/freedreno/ir3/ir3_sched.c b/src/gallium/drivers/freedreno/ir3/ir3_sched.c index c1921d04e4e..94237c33ff8 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_sched.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_sched.c @@ -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)