pan/bi: Allow selecting from an 8-bit vec8

The word offset is already handled by the above code, there's no need to
restrict the further restrict the swizzle. This pattern can come up with OpenCL.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18656>
This commit is contained in:
Alyssa Rosenzweig 2022-06-24 14:53:48 -04:00 committed by Marge Bot
parent 65961848b1
commit f9a01af4f3

View file

@ -1992,8 +1992,7 @@ bi_alu_src_index(bi_builder *b, nir_alu_src src, unsigned comps)
} else if (bitsize == 8) {
/* 8-bit vectors not yet supported */
assert(comps == 1 && "8-bit vectors not supported");
assert(src.swizzle[0] < 4 && "8-bit vectors not supported");
idx.swizzle = BI_SWIZZLE_B0000 + src.swizzle[0];
idx.swizzle = BI_SWIZZLE_B0000 + (src.swizzle[0] & 3);
}
return idx;