From 170d5a012eb71f19f06435b863324f9b36de6ae5 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 23 Mar 2022 12:21:12 -0400 Subject: [PATCH] pan/bi: Avoid masked writes for now 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 Part-of: --- src/panfrost/bifrost/bi_lower_swizzle.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/bifrost/bi_lower_swizzle.c b/src/panfrost/bifrost/bi_lower_swizzle.c index 2d79fcf..f96f9fb 100644 --- a/src/panfrost/bifrost/bi_lower_swizzle.c +++ b/src/panfrost/bifrost/bi_lower_swizzle.c @@ -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); -- 2.7.4