summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_lexer.lpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-25 13:14:37 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-30 13:52:24 -0700
commit953ff1283d3d52e6a6b4850c2b0b574111625010 (patch)
treececa1c6c108067efcc948822b94b4f78c45d7afa /src/glsl/glsl_lexer.lpp
parent116f1d4f95d8eb0a82b272016590549632c865b3 (diff)
glsl2: Use _mesa_glsl_parse_state as the talloc parent, not glsl_shader.
_mesa_glsl_parse_state should be the parent for all temporary allocation done while compiling a shader. glsl_shader should only be used as the parent for the shader's final IR---the _result_ of compilation. Since many IR instructions may be added or discarded during optimization passes, IR should not ever be allocated to glsl_shader directly. Done via sed -i s/talloc_parent(state)/state/g and s/talloc_parent(st)/st/g. This also removes a ton of talloc_parent calls, which may help performance.
Diffstat (limited to 'src/glsl/glsl_lexer.lpp')
-rw-r--r--src/glsl/glsl_lexer.lpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glsl_lexer.lpp b/src/glsl/glsl_lexer.lpp
index fa439f1278..f236a15682 100644
--- a/src/glsl/glsl_lexer.lpp
+++ b/src/glsl/glsl_lexer.lpp
@@ -313,7 +313,7 @@ precision return PRECISION;
[_a-zA-Z][_a-zA-Z0-9]* {
struct _mesa_glsl_parse_state *state = yyextra;
- void *ctx = talloc_parent(state);
+ void *ctx = state;
yylval->identifier = talloc_strdup(ctx, yytext);
return IDENTIFIER;
}