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/linker.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/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index dbcc5b4578f..47a722d9d1e 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -976,7 +976,8 @@ populate_symbol_table(gl_shader *sh) if ((func = inst->as_function()) != NULL) { sh->symbols->add_function(func); } else if ((var = inst->as_variable()) != NULL) { - sh->symbols->add_variable(var); + if (var->data.mode != ir_var_temporary) + sh->symbols->add_variable(var); } } } @@ -2185,6 +2186,7 @@ demote_shader_inputs_and_outputs(gl_shader *sh, enum ir_variable_mode mode) * to have a location assigned. */ if (var->data.is_unmatched_generic_inout) { + assert(var->data.mode != ir_var_temporary); var->data.mode = ir_var_auto; } } |