diff options
author | Albert Astals Cid <[email protected]> | 2020-02-26 23:05:51 +0100 |
---|---|---|
committer | Albert Astals Cid <[email protected]> | 2020-04-18 19:55:45 +0000 |
commit | 06c5875fd6b8fa387a103bd0c6fad4fa5ef847a5 (patch) | |
tree | 0c8f53e84198b1e808e9aef4100a47996d721665 /src/mesa/drivers | |
parent | 94cb129d514b748db1342c6208ae4b7390bd33da (diff) |
Fix promotion of floats to doubles
Use the f variants of the math functions if the input parameter is a
float, saves converting from float to double and running the double
variant of the math function for gaining no precision at all
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3969>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_tnl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c index 9f80e413577..247cad4a38b 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c @@ -244,7 +244,7 @@ nv10_get_spot_coeff(struct gl_light *l, float k[7]) float a0, b0, a1, a2, b2, a3; if (e > 0) - a0 = -1 - 5.36e-3 / sqrt(e); + a0 = -1 - 5.36e-3 / sqrtf(e); else a0 = -1; b0 = 1 / (1 + 0.273 * e); |