pan/bi: Fix incorrectly flipped swizzle
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 1 May 2020 20:38:11 +0000 (16:38 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 4 May 2020 15:08:15 +0000 (11:08 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>

src/panfrost/bifrost/bi_pack.c

index 85dea07899d2b1ad8d147aa3d5d4178a012cb309..f807669d00e048614955d5b3a83e320b5f34680f 100644 (file)
@@ -681,8 +681,8 @@ bi_pack_fmadd_min_f16(bi_instruction *ins, struct bi_registers *regs, bool FMA)
                         .src0_neg = ins->src_neg[flip ? 1 : 0],
                         .src1_neg = ins->src_neg[flip ? 0 : 1],
                         .abs1 = l,
-                        .src0_swizzle = bi_swiz16(ins, 0),
-                        .src1_swizzle = bi_swiz16(ins, 1), 
+                        .src0_swizzle = bi_swiz16(ins, flip ? 1 : 0),
+                        .src1_swizzle = bi_swiz16(ins, flip ? 0 : 1), 
                         .mode = ins->minmax,
                         .op = op
                 };