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/glsl/link_varyings.cpp | |
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/glsl/link_varyings.cpp')
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index 211633d9ee3..52e493cb599 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -38,6 +38,7 @@ #include "link_varyings.h" #include "main/macros.h" #include "util/hash_table.h" +#include "util/u_math.h" #include "program.h" @@ -2879,13 +2880,13 @@ link_varyings(struct gl_shader_program *prog, unsigned first, unsigned last, /* This must be done after all dead varyings are eliminated. */ if (sh_i != NULL) { - unsigned slots_used = _mesa_bitcount_64(reserved_out_slots); + unsigned slots_used = util_bitcount64(reserved_out_slots); if (!check_against_output_limit(ctx, prog, sh_i, slots_used)) { return false; } } - unsigned slots_used = _mesa_bitcount_64(reserved_in_slots); + unsigned slots_used = util_bitcount64(reserved_in_slots); if (!check_against_input_limit(ctx, prog, sh_next, slots_used)) return false; |