diff options
author | Ian Romanick <[email protected]> | 2014-07-08 16:57:33 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-09-30 13:34:42 -0700 |
commit | 7625babfae6c5e86ab349c1a081816fbbcc48d17 (patch) | |
tree | c7e04493ac25f718bbebab5f62d206c9841ab5c6 /src/glsl/ir.h | |
parent | 0e654ab1b9a20671f755cbe71fe51ff6ec849459 (diff) |
glsl: Add the possibility for ir_variable to have a non-ralloced name
Specifically, ir_var_temporary variables constructed with a NULL name
will all have the name "compiler_temp" in static storage.
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/ir.h')
-rw-r--r-- | src/glsl/ir.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index f2186a5af8a..3c947412f40 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -575,6 +575,11 @@ public: return this->u.state_slots; } + inline bool is_name_ralloced() const + { + return this->name != ir_variable::tmp_name; + } + /** * Enable emitting extension warnings for this variable */ @@ -886,6 +891,11 @@ private: * \sa ir_variable::location */ const glsl_type *interface_type; + + /** + * Name used for anonymous compiler temporaries + */ + static const char tmp_name[]; }; /** |