From a8aa73f7685831f2fe2512b25ee2acb64372ad7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 5 Oct 2015 23:18:18 +0200 Subject: [PATCH] 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(+) 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 || -- 2.30.2