[Mesa-dev] [PATCH 0/9] Move nir/glsl to src/compiler

Emil Velikov emil.l.velikov at gmail.com
Fri Nov 27 10:44:23 PST 2015


On 27 November 2015 at 18:37, Jason Ekstrand <jason at jlekstrand.net> wrote:
>
> On Nov 27, 2015 10:16 AM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
>>
>> On 27 November 2015 at 17:54, Jason Ekstrand <jason at jlekstrand.net> wrote:
>> >
>> > On Nov 25, 2015 1:27 PM, "Emil Velikov" <emil.l.velikov at gmail.com>
>> > wrote:
>> >>
>> >> Hello all,
>> >>
>> >> Some of us have been thinking about moving nir out of glsl, and
>> >> fleshing
>> >> out some common helper (static library) that is use by both. So here it
>> >> is - src/compiler.
>> >>
>> >> The modules (libcompiler, libnir and libglsl) are unfortunately not
>> >> really independent.
>> >>  - libcompiler - compile time (mesa ir, glsl ir, util), link - util
>> >>  - libglsl - compile (compiler, mesa ir, util), link - compiler, util
>> >>  - libnir - compile (compiler, mesa ir, glsl ir, util), link -
>> >> compiler,
>> >> util
>> >
>> > Thanks for working on this!  Before I make comments, its worth noting
>> > that
>> > the biggest churn is just moving files.  If we don't have the linking
>> > details figured out, that shouldn't block landing the file churn.
>> >
>> > I was kind of hoping that we could have a libnir that doesn't require
>> > glsl.
>> > It would be good for freedreno and vc4 among other things.  Maybe split
>> > things up differently?
>> >
>> One of us is getting confused here.
>>
>> NIR does _not_ depend during link time on glsl and vice-versa (as per
>> above list).
>
> OK, that wasn't clear.   Where does glsl_to_nir go then?  Does it not
> actually need to link against libglsl?  I could believe it but it does have
> to link against NIR.
>
Suggestions on how to make it clearer are appreciated :-)

glsl_to_nir is stored as currently - in NIR. Things just work out fine
as [I'm leaning that] the linker just removes the file where it's not
needed. And with it the glsl link time dependency.

>> To remove the compile-time dependency, I've spent a fair bit of time
>> trying to flesh things out. Yet that's not possible without rewriting
>> substantial hunks of glsl, nir and mesa.
>
> That's fine. I know that's a lot of work so don't worry about it for now.
>
I had no idea and things started exploding rather badly quite quick
when I gave it a try.

-Emil


More information about the mesa-dev mailing list