diff options
author | Dylan Baker <[email protected]> | 2018-08-21 09:46:46 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-09-07 10:21:26 -0700 |
commit | 8396043f304bb2a752130230055605c5c966e89f (patch) | |
tree | ee2e8a5494b88bff3b5e67ece8ffdba70d12c087 /src/compiler/nir/nir_split_vars.c | |
parent | 80825abb5d1a7491035880253ffd531c55acae6b (diff) |
Replace uses of _mesa_bitcount with util_bitcount
and _mesa_bitcount_64 with util_bitcount_64. This fixes a build problem
in nir for platforms that don't have popcount or popcountll, such as
32bit msvc.
v2: - Fix additional uses of _mesa_bitcount added after this was
originally written
Acked-by: Eric Engestrom <[email protected]> (v1)
Acked-by: Eric Anholt <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_split_vars.c')
-rw-r--r-- | src/compiler/nir/nir_split_vars.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_split_vars.c b/src/compiler/nir/nir_split_vars.c index 6cd835cb013..02aef2a9b47 100644 --- a/src/compiler/nir/nir_split_vars.c +++ b/src/compiler/nir/nir_split_vars.c @@ -26,8 +26,8 @@ #include "nir_deref.h" #include "nir_vla.h" -/* Needed for _mesa_bitcount() */ -#include "main/macros.h" +#include "util/u_math.h" + struct split_var_state { void *mem_ctx; @@ -1277,7 +1277,7 @@ shrink_vec_var_list(struct exec_list *vars, } /* Build the new var type */ - unsigned new_num_comps = _mesa_bitcount(usage->comps_kept); + unsigned new_num_comps = util_bitcount(usage->comps_kept); const struct glsl_type *new_type = glsl_vector_type(glsl_get_base_type(vec_type), new_num_comps); for (int i = usage->num_levels - 1; i >= 0; i--) { |