From dd75ca89ebce58a69da20c1efbf2a53575b2c96e Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Tue, 16 Sep 2008 09:42:28 -0600 Subject: [PATCH] cell: Optimized LERP with fma Please enter the commit message for your changes. --- src/gallium/drivers/cell/ppu/cell_gen_fp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fp.c b/src/gallium/drivers/cell/ppu/cell_gen_fp.c index 612749507be..a80d8ff5d69 100644 --- a/src/gallium/drivers/cell/ppu/cell_gen_fp.c +++ b/src/gallium/drivers/cell/ppu/cell_gen_fp.c @@ -453,8 +453,7 @@ emit_LERP(struct codegen *gen, const struct tgsi_full_instruction *inst) int d_reg = get_dst_reg(gen, ch, &inst->FullDstRegisters[0]); /* d = s3 + s1(s2 - s3) */ spe_fs(gen->f, d_reg, s2_reg, s3_reg); - spe_fm(gen->f, d_reg, d_reg, s1_reg); - spe_fa(gen->f, d_reg, d_reg, s3_reg); + spe_fma(gen->f, d_reg, d_reg, s1_reg, s3_reg); store_dest_reg(gen, d_reg, ch, &inst->FullDstRegisters[0]); free_itemps(gen); } @@ -657,7 +656,7 @@ emit_MAX(struct codegen *gen, const struct tgsi_full_instruction *inst) /* d = (s1 > s2) ? s1 : s2 */ spe_fcgt(gen->f, d_reg, s1_reg, s2_reg); - spe_selb(gen->f, d_reg, s2_reg, s1_reg, d_reg); + spe_selb(gen->f, d_reg, s2_reg, s1_reg, d_reg); store_dest_reg(gen, d_reg, ch, &inst->FullDstRegisters[0]); free_itemps(gen); -- 2.30.2