pan/bi: Fix missing type for fmul
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 27 Mar 2020 19:53:12 +0000 (15:53 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 01:12:26 +0000 (01:12 +0000)
We add a zero argument, we want it to align with the size of whatever
the other arguments were for optimization.

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

src/panfrost/bifrost/bifrost_compile.c

index 3d6b0ab3cad7984a74760a90a12568ddc5de9d72..2d137605bf4cfab13fdab64aae673930c701b0ca 100644 (file)
@@ -566,6 +566,7 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr)
         switch (instr->op) {
         case nir_op_fmul:
                 alu.src[2] = BIR_INDEX_ZERO; /* FMA */
+                alu.src_types[2] = alu.src_types[1];
                 break;
         case nir_op_fsat:
                 alu.outmod = BIFROST_SAT; /* FMOV */