diff options
author | Ian Romanick <[email protected]> | 2017-11-13 11:17:41 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2018-03-29 14:09:23 -0700 |
commit | d76c204d0564701b4b8b6a2bdda50e2939683e66 (patch) | |
tree | edcf51df711640ffd89326079f10b1dcf65f311b /src/gallium/drivers/softpipe | |
parent | a3a16d4aa7e5a22816226d8e7417138164b10525 (diff) |
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 <[email protected]>
Suggested-by: Matt Turner <[email protected]>
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_texture.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index ea5e2c64b84..c49bfcaba55 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -166,9 +166,9 @@ softpipe_resource_create_front(struct pipe_screen *screen, pipe_reference_init(&spr->base.reference, 1); spr->base.screen = screen; - spr->pot = (util_is_power_of_two(templat->width0) && - util_is_power_of_two(templat->height0) && - util_is_power_of_two(templat->depth0)); + spr->pot = (util_is_power_of_two_or_zero(templat->width0) && + util_is_power_of_two_or_zero(templat->height0) && + util_is_power_of_two_or_zero(templat->depth0)); if (spr->base.bind & (PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT | @@ -231,9 +231,9 @@ softpipe_resource_from_handle(struct pipe_screen *screen, pipe_reference_init(&spr->base.reference, 1); spr->base.screen = screen; - spr->pot = (util_is_power_of_two(templat->width0) && - util_is_power_of_two(templat->height0) && - util_is_power_of_two(templat->depth0)); + spr->pot = (util_is_power_of_two_or_zero(templat->width0) && + util_is_power_of_two_or_zero(templat->height0) && + util_is_power_of_two_or_zero(templat->depth0)); spr->dt = winsys->displaytarget_from_handle(winsys, templat, |