From cd667edecccf354f91386a6f4323d6593302583d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 21 Sep 2018 15:00:21 -0700 Subject: vc4: Remove dead i == 0 code from the cos() implementation. The loop starts at 1. --- src/gallium/drivers/vc4/vc4_program.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 1f46b64005b..3c439806d36 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -758,13 +758,10 @@ ntq_fcos(struct vc4_compile *c, struct qreg src) if (i != 1) x = qir_FMUL(c, x, x2); - struct qreg mul = qir_FMUL(c, + sum = qir_FADD(c, qir_FMUL(c, x, - qir_uniform_f(c, coeff[i])); - if (i == 0) - sum = mul; - else - sum = qir_FADD(c, sum, mul); + qir_uniform_f(c, coeff[i])), + sum); } return sum; } -- cgit v1.2.3