replace _mesa_is_pow_two with util_is_power_of_two_*
authorDylan Baker <dylan@pnwbakers.com>
Thu, 6 Sep 2018 18:36:19 +0000 (11:36 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 21 Apr 2020 18:09:03 +0000 (11:09 -0700)
commite533fad182e7069ee0850154f51316dd779501c3
treeaa38ebcd833ad137faf53889fea2202bac7e9eab
parentc1e7c1f4224789f0bc4cc847cecde350e2c6d2f2
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 <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
src/intel/compiler/brw_reg.h
src/intel/compiler/brw_vec4_generator.cpp
src/mesa/drivers/common/meta_blit.c
src/mesa/drivers/dri/i915/i915_texstate.c
src/mesa/drivers/dri/nouveau/nv04_surface.c
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
src/mesa/main/pixel.c
src/mesa/main/teximage.c
src/mesa/swrast/s_texture.c
src/mesa/tnl/t_vb_light.c
src/util/imports.h