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/intel | |
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/intel')
-rw-r--r-- | src/intel/common/gen_l3_config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/common/gen_l3_config.c b/src/intel/common/gen_l3_config.c index 46926f8bdf4..d54368556d3 100644 --- a/src/intel/common/gen_l3_config.c +++ b/src/intel/common/gen_l3_config.c @@ -245,7 +245,7 @@ gen_diff_l3_weights(struct gen_l3_weights w0, struct gen_l3_weights w1) float dw = 0; for (unsigned i = 0; i < GEN_NUM_L3P; i++) - dw += fabs(w0.w[i] - w1.w[i]); + dw += fabsf(w0.w[i] - w1.w[i]); return dw; } |