diff options
author | Eric Anholt <[email protected]> | 2018-09-21 15:00:21 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-09-21 17:16:43 -0700 |
commit | cd667edecccf354f91386a6f4323d6593302583d (patch) | |
tree | 4cb6dabd39b0ff84598bdfb4ad2ac04a07f10940 /src/gallium/drivers | |
parent | 10d5d2d527dea11f4afe300eebeaba077f169af0 (diff) |
vc4: Remove dead i == 0 code from the cos() implementation.
The loop starts at 1.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 9 |
1 files changed, 3 insertions, 6 deletions
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; } |