pan/mdg: Replicate 16-bit swizzles
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 28 Apr 2020 21:44:39 +0000 (17:44 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 15:35:54 +0000 (15:35 +0000)
We don't support vec8 quite yet anyway, this fixes dot products.

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

src/panfrost/midgard/midgard_emit.c

index 6f6a395b430ec83fc4df56efe9ba0cc82eb2a515..98844169faed400674089705a56bb56d27c3b010 100644 (file)
@@ -242,6 +242,12 @@ mir_pack_swizzle_alu(midgard_instruction *ins)
                         }
 
                         src[i].rep_high = upper;
+
+                        /* Replicate for now.. should really pick a side for
+                         * dot products */
+
+                        if (ins->alu.reg_mode == midgard_reg_mode_16)
+                                src[i].rep_low = true;
                 }
 
                 src[i].swizzle = packed;