On Thursday, June 11, 2015 10:41:53 AM Tapani Pälli wrote: > This is based on Kenneth's patch to delete 'most of the IR'. Due to > linker changes to clone variables, we can now free all of IR. > > Saves 58MB of memory when replaying a Dota 2 trace on Broadwell. > > Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> > --- > src/mesa/drivers/dri/i965/brw_shader.cpp | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp > b/src/mesa/drivers/dri/i965/brw_shader.cpp > index 76285f2..99de1cd 100644 > --- a/src/mesa/drivers/dri/i965/brw_shader.cpp > +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp > @@ -297,8 +297,11 @@ brw_link_shader(struct gl_context *ctx, struct > gl_shader_program *shProg) > > brw_add_texrect_params(prog); > > - if (options->NirOptions) > + if (options->NirOptions) { > prog->nir = brw_create_nir(brw, shProg, prog, (gl_shader_stage) > stage); > + ralloc_free(shader->ir); > + shader->ir = NULL; > + } > > _mesa_reference_program(ctx, &prog, NULL); > } >
Thanks, Tapani! Both are: Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> I also think they might be worth a Cc: mesa-sta...@lists.freedesktop.org since it saves a pretty large amount of memory. I'm happy to concede on that point if others feel differently, though.
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