From 9950a98d5e0eec20677f82edb78335d038e3f569 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Tue, 24 Mar 2026 10:01:05 -0400 Subject: [PATCH] pan/bi: Handle 64-bit sources in bi_alu_src_index() Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Christoph Pillmayer Reviewed-by: Lorenzo Rossi Part-of: --- src/panfrost/compiler/bifrost/bifrost_compile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 73d7b6a952c..0ea1597bd5c 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -2545,11 +2545,9 @@ bi_alu_src_index(bi_builder *b, nir_alu_src src, unsigned comps) unsigned offset = 0; - assert(bitsize == 8 || bitsize == 16 || bitsize == 32); - unsigned subword_shift = (bitsize == 32) ? 0 : (bitsize == 16) ? 1 : 2; - + assert(bitsize == 8 || bitsize == 16 || bitsize == 32 || bitsize == 64); for (unsigned i = 0; i < comps; ++i) { - unsigned new_offset = (src.swizzle[i] >> subword_shift); + unsigned new_offset = (src.swizzle[i] * bitsize) / 32; if (i > 0) assert(offset == new_offset && "wrong vectorization");