Allow extracting components Y, Z or W from an 8bit vector.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>
} else if (bitsize == 8) {
/* 8-bit vectors not yet supported */
assert(comps == 1 && "8-bit vectors not supported");
- assert(src.swizzle[0] == 0 && "8-bit vectors not supported");
- idx.swizzle = BI_SWIZZLE_B0000;
+ assert(src.swizzle[0] < 4 && "8-bit vectors not supported");
+ idx.swizzle = BI_SWIZZLE_B0000 + src.swizzle[0];
}
return idx;