glsl: Delete symbol table in post-link shaders

The symbol table in the linked shaders may contain references to
variables that were removed (e.g., unused uniforms).  Since it may
contain junk, there is no possible valid use.  Delete it and set the
pointer to NULL.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Ian Romanick
2011-09-30 14:21:10 -07:00
parent efd027a8b5
commit 7bbcc0b832
+8
View File
@@ -1831,6 +1831,14 @@ done:
/* Retain any live IR, but trash the rest. */
reparent_ir(prog->_LinkedShaders[i]->ir, prog->_LinkedShaders[i]->ir);
/* The symbol table in the linked shaders may contain references to
* variables that were removed (e.g., unused uniforms). Since it may
* contain junk, there is no possible valid use. Delete it and set the
* pointer to NULL.
*/
delete prog->_LinkedShaders[i]->symbols;
prog->_LinkedShaders[i]->symbols = NULL;
}
ralloc_free(mem_ctx);