On Thursday, April 02, 2015 10:36:44 AM Jason Ekstrand wrote:
> On Thu, Apr 2, 2015 at 2:04 AM, Kenneth Graunke <kenn...@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.ekstr...@intel.com>
> 
> Good find, Ken!
> --Jason

Yeah, pretty much everything uses ralloc_parent() of some existing IR.

Thanks!

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to