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/i915/i915_state_sampler.c | |
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/i915/i915_state_sampler.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_state_sampler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c index 84ed1514630..66a5778717a 100644 --- a/src/gallium/drivers/i915/i915_state_sampler.c +++ b/src/gallium/drivers/i915/i915_state_sampler.c @@ -307,7 +307,8 @@ static void update_map(struct i915_context *i915, int first_level = view->u.tex.first_level; const uint num_levels = pt->last_level - first_level; unsigned max_lod = num_levels * 4; - bool is_npot = (!util_is_power_of_two(pt->width0) || !util_is_power_of_two(pt->height0)); + bool is_npot = (!util_is_power_of_two_or_zero(pt->width0) || + !util_is_power_of_two_or_zero(pt->height0)); uint format, pitch; /* |