add 0->0 path to approx_powf()
The path involving approx_log2() and approx_pow2() does not produce 0. And it's probably not a good idea to think about what approx_log2(0) is anyway. Change-Id: If5f48298c5bd5565ae808ebdfbd02649f4dd3046 Reviewed-on: https://skia-review.googlesource.com/85840 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
36d7178792
commit
61efab3e4e
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -651,7 +651,8 @@ SI F approx_pow2(F x) {
|
||||
}
|
||||
|
||||
SI F approx_powf(F x, F y) {
|
||||
return approx_pow2(approx_log2(x) * y);
|
||||
return if_then_else(x == 0, 0
|
||||
, approx_pow2(approx_log2(x) * y));
|
||||
}
|
||||
|
||||
SI F from_half(U16 h) {
|
||||
|
Loading…
Reference in New Issue
Block a user