From: Alyssa Rosenzweig Date: Thu, 15 Aug 2019 21:23:05 +0000 (-0700) Subject: pan/midgard: Fix texw lowering with complex control flow X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=739e09c2974533a119d341020166e95f4ef0f604;p=mesa.git pan/midgard: Fix texw lowering with complex control flow Fixes shaders with control flow like: out = 0; if (A) { if (B) out = texture(A, ...) } else { out = texture(B, ...) } Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c index 4754971acb2..5df8ecf0df0 100644 --- a/src/panfrost/midgard/midgard_ra.c +++ b/src/panfrost/midgard/midgard_ra.c @@ -497,7 +497,7 @@ mir_lower_special_reads(compiler_context *ctx) midgard_instruction *use = mir_next_op(pre_use); assert(use); mir_insert_instruction_before(use, m); - mir_rewrite_index_dst_tag(ctx, i, idx, classes[j]); + mir_rewrite_index_dst_single(pre_use, i, idx); } else { idx = spill_idx++; m = v_mov(i, blank_alu_src, idx);