[Mesa-dev] [PATCH 00/31] Make more use of bitmasks v2
Brian Paul
brianp at vmware.com
Tue Jun 7 16:38:49 UTC 2016
On 06/07/2016 10:09 AM, Mathias Fröhlich wrote:
> Hi,
>
> On Tuesday, June 07, 2016 16:15:58 Nicolai Hähnle wrote:
>
> > Thanks for staying with this!
>
> >
>
> > I know it's bike-shedding, and I'm not sure what other people's opinions
>
> > are on this matter, but having the duplication of u_bit_scan and
>
> > _mesa_bit_scan feels a bit annoying to me...
>
> Well, yes, I can see that. But I feared that I open up a lot of additional
>
> discussion if I basically start to unify galliums u_math.h with mesa.
>
> So, I initially went with this least intrusive solution.
>
> I have seen that src/util/bitset.h already just pulls
> ..gallium../util/u_math.h
>
> directly. So given that the topic is about kind of bitsets I could
> imagine to pull
>
> the u_bit_scan functions though util/bitset.h?
Let's not do that. util/bitset.h basically defines a bitvector datatype
and related operators. I don't think anything else should go in there.
I'd probably opt for a new util/bitscan.h file which just has the
functions related to scanning over bits in bitfields, plus maybe the
ffs()-like functions.
Whether you want to do that refactoring before or after your current
patch series doesn't really matter to me.
-Brian
More information about the mesa-dev
mailing list