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.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.c')
-rw-r--r-- | src/compiler/nir/nir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index a6240c11f2d..402fd2c7725 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -31,8 +31,8 @@ #include <limits.h> #include <assert.h> #include <math.h> +#include "util/u_math.h" -#include "main/imports.h" /* _mesa_bitcount_64 */ #include "main/menums.h" /* BITFIELD64_MASK */ nir_shader * @@ -1862,7 +1862,7 @@ nir_system_value_from_intrinsic(nir_intrinsic_op intrin) * the original OpenGL single-slot input numbering. The mapping from old * locations to new locations is as follows: * - * new_loc = loc + _mesa_bitcount(dual_slot & BITFIELD64_MASK(loc)) + * new_loc = loc + util_bitcount(dual_slot & BITFIELD64_MASK(loc)) */ void nir_remap_dual_slot_attributes(nir_shader *shader, uint64_t *dual_slot) @@ -1879,7 +1879,7 @@ nir_remap_dual_slot_attributes(nir_shader *shader, uint64_t *dual_slot) nir_foreach_variable(var, &shader->inputs) { var->data.location += - _mesa_bitcount_64(*dual_slot & BITFIELD64_MASK(var->data.location)); + util_bitcount64(*dual_slot & BITFIELD64_MASK(var->data.location)); } } |