[Mesa-dev] [PATCH] i965: release GLSL IR in LinkShader after it's not needed
Tapani Pälli
tapani.palli at intel.com
Mon Sep 5 06:18:09 UTC 2016
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mesa/drivers/dri/i965/brw_link.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index 4800be0..2b1fa61 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;
}
--
2.7.4
More information about the mesa-dev
mailing list