[Mesa-dev] [PATCH] i965: Free dead GLSL IR one last time.
Kenneth Graunke
kenneth at whitecape.org
Thu Apr 2 14:10:26 PDT 2015
On Thursday, April 02, 2015 10:36:44 AM Jason Ekstrand wrote:
> On Thu, Apr 2, 2015 at 2:04 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > While working on NIR's memory allocation model, I realized the GLSL IR
> > memory model was broken.
> >
> > During glCompileShader, we allocate everything out of the
> > _mesa_glsl_parse_state context, and reparent it to gl_shader at the end.
> >
> > During glLinkProgram, we allocate everything out of a temporary context,
> > then reparent it to the exec_list containing the linked IR.
> >
> > But during brw_link_shader - the driver's final opportunity to do
> > lowering and optimization - we just allocated everything out of the
> > permanent context given to us by the linker. That memory stayed
> > forever.
>
> So the optimization passes just keep everything in whatever memory
> context the IR currently lives in?
>
> Assuming that's correct,
> Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
> Good find, Ken!
> --Jason
Yeah, pretty much everything uses ralloc_parent() of some existing IR.
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150402/099c70d7/attachment.sig>
More information about the mesa-dev
mailing list