projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cd02e3
)
i965: release GLSL IR in LinkShader after it's not needed
author
Tapani Pälli
<tapani.palli@intel.com>
Mon, 5 Sep 2016 06:18:09 +0000
(09:18 +0300)
committer
Tapani Pälli
<tapani.palli@intel.com>
Fri, 9 Sep 2016 04:51:04 +0000
(07:51 +0300)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/mesa/drivers/dri/i965/brw_link.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_link.cpp
b/src/mesa/drivers/dri/i965/brw_link.cpp
index 4800be07e8021dfbca61009c2e47f7b13afdf218..2b1fa61e11797b9e256a1f05630523d88b539f0c 100644
(file)
--- 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;
}