pan/bi: Handle 64-bit sources in bi_alu_src_index()

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
This commit is contained in:
Faith Ekstrand 2026-03-24 10:01:05 -04:00 committed by Marge Bot
parent 4be0e46e61
commit 9950a98d5e

View file

@ -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");