diff options
author | Ian Romanick <[email protected]> | 2014-07-08 18:53:09 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-09-30 13:34:42 -0700 |
commit | a99482482d74ba654d8ec15d0a09e5b3cb0160e9 (patch) | |
tree | d4723379eb3ae1fd4472c558031b2e302a15d7a9 /src/glsl/glsl_parser_extras.cpp | |
parent | 7625babfae6c5e86ab349c1a081816fbbcc48d17 (diff) |
glsl: Never put ir_var_temporary variables in the symbol table
Later patches will give every ir_var_temporary the same name in release
builds. Adding a bunch of variables named "compiler_temp" to the symbol
table can only cause problems.
No change Valgrind massif results for a trimmed apitrace of dota2.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 2da6d5ab9d5..5005cff9d67 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1536,9 +1536,13 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader, case ir_type_function: shader->symbols->add_function((ir_function *) ir); break; - case ir_type_variable: - shader->symbols->add_variable((ir_variable *) ir); + case ir_type_variable: { + ir_variable *const var = (ir_variable *) ir; + + if (var->data.mode != ir_var_temporary) + shader->symbols->add_variable(var); break; + } default: break; } |