pan/mdg: Pack 8-bit swizzles in 16-bit ops
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 13 May 2020 22:24:25 +0000 (18:24 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 May 2020 17:49:14 +0000 (17:49 +0000)
Let's inch closer to 8-bit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>

src/panfrost/midgard/midgard_emit.c

index e4911c1faf49dac0418373ce7c74d15370d9f10a..c8340f9e44d06dce75a4bc6365b977559386cf78 100644 (file)
@@ -257,9 +257,12 @@ mir_pack_swizzle(unsigned mask, unsigned *swizzle,
                 /* Replicate for now.. should really pick a side for
                  * dot products */
 
-                if (reg_mode == midgard_reg_mode_16) {
+                if (reg_mode == midgard_reg_mode_16 && sz == 16) {
                         *rep_low = !upper;
                         *rep_high = upper;
+                } else if (reg_mode == midgard_reg_mode_16 && sz == 8) {
+                        *rep_low = upper;
+                        *rep_high = upper;
                 } else if (reg_mode == midgard_reg_mode_32) {
                         *rep_low = upper;
                 } else {