Commit 034dabf3 by Greg Hartman

Fix mixed type call to max

Change-Id: I12c262fbdc2b2b489c02871fb9477bf25a0cfb6b Reviewed-on: https://swiftshader-review.googlesource.com/4050Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarGreg Hartman <ghartman@google.com>
parent 5d6c1c79
......@@ -323,7 +323,7 @@ namespace sw
const float blue_c = sw::max(0.0f, sw::min(MaxValue, blue));
const float max_c = sw::max(sw::max(red_c, green_c), blue_c);
const float exp_p = sw::max(-Bias - 1.0f, floor(log(max_c))) + 1.0f + Bias;
const float exp_p = sw::max(-Bias - 1.0f, floorf(log(max_c))) + 1.0f + Bias;
const int max_s = static_cast<int>(floor((max_c / (pow(2.0f, exp_p - Bias - MantissaBits))) + 0.5f));
const int exp_s = static_cast<int>((max_s < pow(2.0f, MantissaBits)) ? exp_p : exp_p + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment