From 4f5b3802dc4c59cb99e3c81144629d5aba9c085a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 21 May 2020 18:05:29 -0400 Subject: [PATCH] pan/mdg: Eliminate 64-bit swizzle packing division Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_emit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c index 6431dc02c0e..cf283dd3ed5 100644 --- a/src/panfrost/midgard/midgard_emit.c +++ b/src/panfrost/midgard/midgard_emit.c @@ -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); -- 2.30.2