summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2016-09-05 09:18:09 +0300
committerTapani Pälli <[email protected]>2016-09-09 07:51:04 +0300
commit4542c7ed5fc6d8cb2495d322b4f06d802d7292cc (patch)
treec713424e611f9fa6c797f740b33e94a07cc72d3d /src/mesa
parent2cd02e30d2e1677762d34f1831b8e609970ef0f3 (diff)
i965: release GLSL IR in LinkShader after it's not needed
Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 4800be07e80..2b1fa61e117 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -286,5 +286,16 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
return false;
build_program_resource_list(ctx, shProg);
+
+ for (stage = 0; stage < ARRAY_SIZE(shProg->_LinkedShaders); stage++) {
+ struct gl_linked_shader *shader = shProg->_LinkedShaders[stage];
+ if (!shader)
+ continue;
+
+ /* The GLSL IR won't be needed anymore. */
+ ralloc_free(shader->ir);
+ shader->ir = NULL;
+ }
+
return true;
}