util: Move util_is_power_of_two to bitscan.h and rename to util_is_power_of_two_or_zero
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 13 Nov 2017 19:17:41 +0000 (11:17 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 29 Mar 2018 21:09:23 +0000 (14:09 -0700)
commitd76c204d0564701b4b8b6a2bdda50e2939683e66
treeedcf51df711640ffd89326079f10b1dcf65f311b
parenta3a16d4aa7e5a22816226d8e7417138164b10525
util: Move util_is_power_of_two to bitscan.h and rename to util_is_power_of_two_or_zero

The new name make the zero-input behavior more obvious.  The next
patch adds a new function with different zero-input behavior.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Suggested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
37 files changed:
src/amd/common/ac_gpu_info.c
src/amd/common/ac_surface.c
src/amd/vulkan/radv_formats.c
src/broadcom/compiler/nir_to_vir.c
src/gallium/auxiliary/gallivm/lp_bld_arit.c
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
src/gallium/auxiliary/gallivm/lp_bld_gather.c
src/gallium/auxiliary/gallivm/lp_bld_pack.c
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/util/u_math.h
src/gallium/auxiliary/util/u_ringbuffer.c
src/gallium/drivers/etnaviv/etnaviv_blt.c
src/gallium/drivers/etnaviv/etnaviv_texture_state.c
src/gallium/drivers/freedreno/freedreno_query_hw.c
src/gallium/drivers/i915/i915_state_sampler.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
src/gallium/drivers/nouveau/nv30/nv30_miptree.c
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
src/gallium/drivers/r300/r300_texture_desc.c
src/gallium/drivers/r600/r600_texture.c
src/gallium/drivers/radeon/r600_texture.c
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
src/gallium/drivers/softpipe/sp_texture.c
src/gallium/drivers/swr/swr_screen.cpp
src/gallium/drivers/vc4/vc4_program.c
src/intel/compiler/brw_fs.cpp
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_formats.c
src/intel/vulkan/anv_nir_lower_multiview.c
src/mesa/state_tracker/st_cb_readpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/util/bitscan.h
src/util/u_vector.c