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/mesa/state_tracker | |
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/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index d0ec410ec69..24776f7f9c4 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -32,7 +32,6 @@ #include "program/prog_parameter.h" #include "program/ir_to_mesa.h" #include "main/mtypes.h" -#include "main/imports.h" #include "main/errors.h" #include "main/shaderapi.h" #include "main/uniforms.h" @@ -91,10 +90,10 @@ st_nir_assign_vs_in_locations(struct gl_program *prog, nir_shader *nir) */ if (var->data.location == VERT_ATTRIB_EDGEFLAG) { /* bit of a hack, mirroring st_translate_vertex_program */ - var->data.driver_location = _mesa_bitcount_64(nir->info.inputs_read); + var->data.driver_location = util_bitcount64(nir->info.inputs_read); } else if (nir->info.inputs_read & BITFIELD64_BIT(var->data.location)) { var->data.driver_location = - _mesa_bitcount_64(nir->info.inputs_read & + util_bitcount64(nir->info.inputs_read & BITFIELD64_MASK(var->data.location)); nir->num_inputs++; } else { |