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/swrast | |
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/swrast')
-rw-r--r-- | src/mesa/swrast/s_texfilter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index f73037791de..cb91b81260e 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1628,7 +1628,7 @@ create_filter_table(void) for (i = 0; i < WEIGHT_LUT_SIZE; ++i) { GLfloat alpha = 2; GLfloat r2 = (GLfloat) i / (GLfloat) (WEIGHT_LUT_SIZE - 1); - GLfloat weight = (GLfloat) exp(-alpha * r2); + GLfloat weight = expf(-alpha * r2); weightLut[i] = weight; } } |