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 <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3969>
This commit is contained in:
committed by
Albert Astals Cid
parent
94cb129d51
commit
06c5875fd6
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user