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 <eric.engestrom@intel.com> (v1)
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Dylan Baker
2018-08-21 09:46:46 -07:00
parent 80825abb5d
commit 8396043f30
36 changed files with 104 additions and 134 deletions

View File

@@ -364,7 +364,7 @@ populate_wm_prog_key(const struct gen_device_info *devinfo,
key->color_outputs_valid |= (1 << i);
}
key->nr_color_regions = _mesa_bitcount(key->color_outputs_valid);
key->nr_color_regions = util_bitcount(key->color_outputs_valid);
key->replicate_alpha = key->nr_color_regions > 1 &&
ms_info && ms_info->alphaToCoverageEnable;