From 656051d735c949021e7eb206b6c4a633cc76936f Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 27 Apr 2020 17:00:17 -0700 Subject: freedreno/ir3/ra: only assign array base in first pass In particular, we specifically don't want to let the base change between passes, as it could end up conflicting with registers assigned in the first pass. Mostly-closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2838 Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_ra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_ra.c b/src/freedreno/ir3/ir3_ra.c index 656fa01193e..927f91e98ec 100644 --- a/src/freedreno/ir3/ir3_ra.c +++ b/src/freedreno/ir3/ir3_ra.c @@ -1383,7 +1383,8 @@ ra_precolor(struct ir3_ra_ctx *ctx, struct ir3_instruction **precolor, unsigned if (arr->end_ip == 0) continue; - assign_arr_base(ctx, arr, precolor, nprecolor); + if (!ctx->scalar_pass) + assign_arr_base(ctx, arr, precolor, nprecolor); unsigned base = arr->reg; -- cgit v1.2.3