From 739e09c2974533a119d341020166e95f4ef0f604 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 15 Aug 2019 14:23:05 -0700 Subject: [PATCH] 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 --- src/panfrost/midgard/midgard_ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2