pan/mdg: Eliminate 64-bit swizzle packing division

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154>
This commit is contained in:
Alyssa Rosenzweig 2020-05-21 18:05:29 -04:00
parent 28a750c5f2
commit 4f5b3802dc

View file

@ -200,7 +200,8 @@ mir_pack_swizzle(unsigned mask, unsigned *swizzle,
unsigned sz = nir_alu_type_get_type_size(T);
if (reg_mode == midgard_reg_mode_64) {
unsigned components = 64 / sz;
assert(sz == 64 || sz == 32);
unsigned components = (sz == 32) ? 4 : 2;
packed = mir_pack_swizzle_64(swizzle, components);