[Mesa-dev] Rename mesa/src/util (Was: gallium/util: add u_bit_scan64)

Marek Olšák maraeo at gmail.com
Sun Feb 8 03:27:42 PST 2015


I kind of like the "util_" prefix everywhere. u_math only depends on
p_config.h and p_compiler.h. I don't think it would be hard to move
those two into src/util as well. We have always wanted Mesa to use
more of Gallium. This might be a good start.

Just my 2 cents.

Marek

On Sat, Feb 7, 2015 at 3:46 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
> On 07/02/15 00:10, Matt Turner wrote:
>>
>> On Fri, Feb 6, 2015 at 3:58 PM, Emil Velikov <emil.l.velikov at gmail.com>
>> wrote:
>>>>
>>>> "util" is meant to be for shared utility across the entire code base -
>>>> both Mesa and Gallium.  It's been growing slowly as people move things
>>>> there.  It might make sense to move a lot of src/gallium/auxiliary/util
>>>> there, in fact - there's always been a lot of duplication between Mesa
>>>> and Gallium's utility code.  But that's up to the Gallium developers.
>>>>
>>> Imho currently the util library is growing on the basis of "we can
>>> share X let's throw it in there" rather than putting much thought
>>> about the structure/"design" of it - unlike in gallium.
>>
>>
>> Are you serious? Let's be honest with ourselves. I probably would have
>> been a better plan to not put commonly useful code deep in Gallium in
>> the first place.
>
>
> Historic reasons, as Brian explained.  Gallium was supposed to become a
> dependency of Mesa but it didn't panned out.
>
>> Apparently this is what I get for trying to do the right thing an pull
>> the atomics code out into a place the rest of the Mesa project can use
>> it.
>
>
> I really appreciate you went the extra mile there.  And for me it's way more
> important that we start sharing code than the naming structure.
>
> Especially when naming is subject to test/style whereas code reuse is
> something everybody can readily agree on.
>
> If the outcome of this email thread would be to dicentivate you to share
> more code, then that would be worst outcome indeed.
>
> Anyway, let's get out of this criticism spiral, and instead focus on how we
> can solve the issues to everybody's satisfaction.
>
>> How about instead of an annoying bikeshed thread we just finish moving
>> bits of Gallium's util directory to src/util and be done with it?
>
>
> If renaming src/util is not something we can agree fine.  Let's forget about
> it.
>
>
> But I don't think I (or anybody) has the time to move
> src/gallium/auxiliary/util to src/util in one go.  The code is entangled
> with src/gallium/include .
>
> That is, moving the whole src/gaullium/auxiliary/util to src/util equals to
> add gallium as dependency to whole mesa.  If that's OK, then I agree with
> Brian's suggestion: might as well do that (leave util in
> src/gallium/axuliary ) and add src/gallium/* as includes/dependency
> everwhere.
>
> I think for Mesa (src/mesa) this is fine.  I'm not sure about src/glsl.
>
> Again, I suspect this won't be something we'll agree neither.
>
>
>
> So I'm back to the beginning: I want to move some math helpers from
> src/gallium/auxiliary/util/u_math to somewhere inside src/util.  I need
> _some_ name: cgrt_*.h is no good, math.h would collide with standard C
> headers, u_math.h would collide with src/gallium/auxiliary/util, so it must
> be something else.  I'm open to suggestions.  If none I'll go with
> mathhelpers.h
>
>
>
> Jose
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list