[Mesa-dev] [PATCH] nir/sweep: Reparent the shader name
Jason Ekstrand
jason at jlekstrand.net
Wed Oct 7 20:45:42 PDT 2015
On Oct 7, 2015 8:40 PM, "Matt Turner" <mattst88 at gmail.com> wrote:
>
> On Wed, Oct 7, 2015 at 8:30 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> > ---
>
> Because otherwise it was being freed?
Yes
> > src/glsl/nir/nir_sweep.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/src/glsl/nir/nir_sweep.c b/src/glsl/nir/nir_sweep.c
> > index d354975..b6ce43b 100644
> > --- a/src/glsl/nir/nir_sweep.c
> > +++ b/src/glsl/nir/nir_sweep.c
> > @@ -154,6 +154,8 @@ nir_sweep(nir_shader *nir)
> > /* First, move ownership of all the memory to a temporary context;
assume dead. */
> > ralloc_adopt(rubbish, nir);
> >
> > + ralloc_steal(nir, (char *)nir->info.name);
> > +
> > /* Variables and registers are not dead. Steal them back. */
> > steal_list(nir, nir_variable, &nir->uniforms);
> > steal_list(nir, nir_variable, &nir->inputs);
> > --
> > 2.5.0.400.gff86faf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151007/7975cabc/attachment.html>
More information about the mesa-dev
mailing list