Moving code around, post classic

Timothy Arceri tarceri at
Tue Dec 7 13:47:09 UTC 2021

On Tue, 2021-12-07 at 08:19 -0500, Alyssa Rosenzweig wrote:
> > 
> > 2. Move src/compiler/glsl into src/gallium/frontends/mesa as well
> > 
> >     Given that there are now no? drivers that use GLSL-IR directly,
> > it
> >     might make sense to move the glsl compiler into the mesa
> >     state_tracker, and just have that lower to TGSI or NIR, and
> > treat
> >     GLSL-IR as an implementation detail of the OpenGL frontend.
> It would be an ack from, but...
> >     Unfortunately, there are a lot of code outside of glsl that
> > uses the
> >     linked list implementation in the glsl compiler, and not the on
> > in
> >     util.
> If it were just linked lists, I'd say someone should write the
> Coccinelle to transform the tree to use the one in util and call it a
> day. It's a bit more complicated though, NIR depends on GLSL types.
> Though that could probably continue to live in its current location
> even
> if glsl moves? Might breed confusion.

I agree moving this is more trouble than its worth IMO, its easy to
understand why its in the compiler dir, and its right next to all the
common code it shares with nir, shader_info, glsl_types, etc.

Its also worth noting that the state tracker isn't the only potental
user as the glsl compile can still be build as a standalone executable.
My prefrence is for this code to stay where it is.

More information about the mesa-dev mailing list