From bbd3a8eaddc12b64fbd61eff954983771f07be24 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Tue, 17 Nov 2020 21:48:27 +0100 Subject: [PATCH] pan/bi: Emit a combine even if we only pass one staging reg to TEXC We need that to account for potential swizzling on the source reg. Signed-off-by: Boris Brezillon Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 7cbba974043..d072cd16da0 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -2074,16 +2074,13 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr) } } - if (dreg_index > 1) { + if (dreg_index >= 1) { /* Pass combined data registers together */ tex.src[0] = combine.dest; bi_emit(ctx, combine); for (unsigned i = 0; i < dreg_index; ++i) tex.swizzle[0][i] = i; - } else if (dreg_index == 1) { - tex.src[0] = combine.src[0]; - tex.swizzle[0][0] = combine.swizzle[0][0]; } else { tex.src[0] = tex.dest; }