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/main/arrayobj.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/mesa/main/arrayobj.c')
-rw-r--r-- | src/mesa/main/arrayobj.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 6e0665c0e5d..ad34282afc8 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -53,6 +53,7 @@ #include "varray.h" #include "util/bitscan.h" #include "util/u_atomic.h" +#include "util/u_math.h" const GLubyte @@ -755,7 +756,7 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx, * grouping information in a seperate array beside * gl_array_attributes/gl_vertex_buffer_binding. */ - assert(_mesa_bitcount(binding->_BoundArrays & vao->_Enabled) == 1 + assert(util_bitcount(binding->_BoundArrays & vao->_Enabled) == 1 || (vao->_Enabled & ~binding->_BoundArrays) == 0); /* Start this current effective binding with the array */ @@ -775,7 +776,7 @@ _mesa_update_vao_derived_arrays(struct gl_context *ctx, &vao->BufferBinding[attrib2->BufferBindingIndex]; /* See the comment at the same assert above. */ - assert(_mesa_bitcount(binding2->_BoundArrays & vao->_Enabled) == 1 + assert(util_bitcount(binding2->_BoundArrays & vao->_Enabled) == 1 || (vao->_Enabled & ~binding->_BoundArrays) == 0); /* Check if we have an identical binding */ |