Module: Mesa Branch: master Commit: 1d72de3bcc9a5aa05ae612ee67ca00858f0d33fa URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d72de3bcc9a5aa05ae612ee67ca00858f0d33fa
Author: Kenneth Graunke <[email protected]> Date: Wed Mar 27 23:09:11 2019 -0700 st/nir: Free the GLSL IR after linking. i965 does this, and st's tgsi path does this. st/nir did not. Cuts 138MB of memory from a DiRT Rally trace, which is about 44% of the total GLSL IR memory. Reviewed-by: Timothy Arceri <[email protected]> --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 78ca83c76e7..96fc257032e 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -839,6 +839,10 @@ st_link_nir(struct gl_context *ctx, } nir_sweep(shader->Program->nir); + + /* The GLSL IR won't be needed anymore. */ + ralloc_free(shader->ir); + shader->ir = NULL; } return true; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
