summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-09-06 11:36:19 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-04-21 11:09:03 -0700
commite533fad182e7069ee0850154f51316dd779501c3 (patch)
treeaa38ebcd833ad137faf53889fea2202bac7e9eab /src/mesa/tnl
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 <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>
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_light.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index cd0a5544c93..655e5827d0c 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -399,7 +399,7 @@ static void validate_lighting( struct gl_context *ctx,
}
else {
/* Power of two means only a single active light. */
- if (_mesa_is_pow_two(ctx->Light._EnabledLights))
+ if (util_is_power_of_two_or_zero(ctx->Light._EnabledLights))
tab = _tnl_light_fast_single_tab;
else
tab = _tnl_light_fast_tab;