pan/bi: Avoid masked writes for now
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 23 Mar 2022 16:21:12 +0000 (12:21 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 14:20:45 +0000 (14:20 +0000)
Our swizzle lowering optimizations depend on replication of scalar fp16. This
holds on Bifrost (at least for now), but not on Valhall which has proper support
for write masks. For now, enforce Bifrost-compatible behaviour as we do not make
use of the write masks on Valhall yet.

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

src/panfrost/bifrost/bi_lower_swizzle.c

index 2d79fcf..f96f9fb 100644 (file)
@@ -259,6 +259,12 @@ bi_lower_swizzle(bi_context *ctx)
                         ins->op = BI_OPCODE_MOV_I32;
                         ins->src[0].swizzle = BI_SWIZZLE_H01;
                 }
+
+                /* The above passes rely on replicating destinations.  For
+                 * Valhall, we will want to optimize this. For now, default
+                 * to Bifrost compatible behaviour.
+                 */
+                ins->dest[0].swizzle = BI_SWIZZLE_H01;
         }
 
         free(replicates_16);