From: Marek Olšák Date: Mon, 5 Oct 2015 21:18:18 +0000 (+0200) Subject: st/mesa: release GLSL IR in LinkShader after it's not needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8aa73f7685831f2fe2512b25ee2acb64372ad7f;p=mesa.git st/mesa: release GLSL IR in LinkShader after it's not needed Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index ff89be37cbb..2ad91ecf4df 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6149,6 +6149,10 @@ get_mesa_program(struct gl_context *ctx, prog->OutputsWritten, 0ULL, prog->PatchOutputsWritten); count_resources(v, prog); + /* The GLSL IR won't be needed anymore. */ + ralloc_free(shader->ir); + shader->ir = NULL; + /* This must be done before the uniform storage is associated. */ if (shader->Type == GL_FRAGMENT_SHADER && (prog->InputsRead & VARYING_BIT_POS ||