pan/midg: Fix the upper/lower limit on 8bit vectors

If I'm correct, the lower/upper split on 8bit vectors is 8, not 4.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14885>
This commit is contained in:
Boris Brezillon 2021-09-09 10:36:03 +02:00 committed by Alyssa Rosenzweig
parent b58c262144
commit da474d5d14
1 changed files with 2 additions and 2 deletions

View File

@ -276,13 +276,13 @@ mir_pack_swizzle(unsigned mask, unsigned *swizzle,
for (unsigned c = (dest_up ? 4 : 0); c < (dest_up ? 8 : 4); ++c) {
unsigned v = swizzle[c];
ASSERTED bool t_upper = v > 3;
ASSERTED bool t_upper = v > (sz == 8 ? 7 : 3);
/* Ensure we're doing something sane */
if (mask & (1 << c)) {
assert(t_upper == upper);
assert(v <= 7);
assert(v <= (sz == 8 ? 15 : 7));
}
/* Use the non upper part */