summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-09-06 11:36:19 -0700
committerDylan Baker <[email protected]>2020-04-21 11:09:03 -0700
commite533fad182e7069ee0850154f51316dd779501c3 (patch)
treeaa38ebcd833ad137faf53889fea2202bac7e9eab /src/util
parentc1e7c1f4224789f0bc4cc847cecde350e2c6d2f2 (diff)
replace _mesa_is_pow_two with util_is_power_of_two_*
Mostly this uses util_is_power_of_two_or_zero, which has the same behavior as _mesa_is_pow_two when the input is zero. In cases where the value is known to be != 0 ahead of time I used the _nonzero variant as it may be faster on some platforms. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/imports.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/util/imports.h b/src/util/imports.h
index 4ebae04ffc7..03a6c0ef358 100644
--- a/src/util/imports.h
+++ b/src/util/imports.h
@@ -190,16 +190,6 @@ static inline int IFLOOR(float f)
#endif
}
-
-/**
- * Is x a power of two?
- */
-static inline int
-_mesa_is_pow_two(int x)
-{
- return !(x & (x - 1));
-}
-
/**
* Round given integer to next higer power of two
* If X is zero result is undefined.