[Mesa-dev] Unused (?) duplicated GLSL IR state in NIR

Connor Abbott cwabbott0 at gmail.com
Mon Nov 2 09:33:53 PST 2015


On Mon, Nov 2, 2015 at 8:35 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Hi all,
>
> From a quick look, it seems that NIR copies (almost ?) all the state
> from GLSL IR even if it doesn't use it.
>
> The particular piece that I'm thinking about is nir_variable::data.
> Afaict this is a remnant from the early days, when the intent was to
> kill off the GLSL IR and use NIR directly. If so should we just nuke
> it, or (if there is someone working on it) add some comments "Keepme:
> WIP work by XXX to use this and kill the glsl IR one".
>
> The (not that distant) GLSL IR memory optimisations by Ian, seems to
> have missed NIR. Was that intentional or were those worked upon before
> NIR got merged ? Perhaps it's worth porting them over ?
>
>
> Thanks
> Emil
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Hi Emil,

Indeed, nir_variable was copied from ir_variable before Ian's memory
optimizations landed. Also, as you noticed, there are a number of
fields only used by the GLSL linker, so they're unused until/unless we
do linking in NIR. I wouldn't be opposed to nuking those, since we can
always revert the commit if/when we get to that.

Connor


More information about the mesa-dev mailing list