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:
@@ -24,6 +24,7 @@
|
||||
#include "brw_vec4.h"
|
||||
#include "brw_cfg.h"
|
||||
#include "brw_eu.h"
|
||||
#include "util/u_math.h"
|
||||
|
||||
namespace brw {
|
||||
|
||||
@@ -1317,7 +1318,7 @@ vec4_visitor::emit_urb_slot(dst_reg reg, int varying)
|
||||
* determine which edges should be drawn as wireframe.
|
||||
*/
|
||||
current_annotation = "edge flag";
|
||||
int edge_attr = _mesa_bitcount_64(nir->info.inputs_read &
|
||||
int edge_attr = util_bitcount64(nir->info.inputs_read &
|
||||
BITFIELD64_MASK(VERT_ATTRIB_EDGEFLAG));
|
||||
emit(MOV(reg, src_reg(dst_reg(ATTR, edge_attr,
|
||||
glsl_type::float_type, WRITEMASK_XYZW))));
|
||||
|
Reference in New Issue
Block a user