summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_validate.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2017-11-13 13:00:53 -0800
committerIan Romanick <[email protected]>2018-03-29 14:09:28 -0700
commit22fbb5c5949b1590ef04b6432dd7f3a93a37c2ed (patch)
treec43dcd5e0d83802f39221369da90d1eed745b808 /src/compiler/nir/nir_validate.c
parentd76c204d0564701b4b8b6a2bdda50e2939683e66 (diff)
util: Add and use util_is_power_of_two_nonzero
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_validate.c')
-rw-r--r--src/compiler/nir/nir_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index 725ba43152c..565cb2ef163 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -982,7 +982,7 @@ validate_var_decl(nir_variable *var, bool is_global, validate_state *state)
validate_assert(state, is_global == nir_variable_is_global(var));
/* Must have exactly one mode set */
- validate_assert(state, util_bitcount(var->data.mode) == 1);
+ validate_assert(state, util_is_power_of_two_nonzero(var->data.mode));
if (var->data.compact) {
/* The "compact" flag is only valid on arrays of scalars. */