From a8aa73f7685831f2fe2512b25ee2acb64372ad7f Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 5 Oct 2015 23:18:18 +0200 Subject: st/mesa: release GLSL IR in LinkShader after it's not needed Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') 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 || -- cgit v1.2.3