diff options
author | Marek Olšák <[email protected]> | 2016-10-07 19:17:15 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-31 11:53:38 +0100 |
commit | a4a93103fb8f5c21c4cd17e89f07badfab14c0ab (patch) | |
tree | 872591f19289352b83b2b7f8aef1fc0cebb00294 /src/compiler/glsl/glsl_symbol_table.cpp | |
parent | 2296bb09675e2031d75e11a96bf1ab0d0cc4bd38 (diff) |
glsl: use the linear allocator for ast_node and derived classes
Tested-by: Edmondo Tommasina <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_symbol_table.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_symbol_table.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_symbol_table.cpp b/src/compiler/glsl/glsl_symbol_table.cpp index 15e819eacc6..8922bb4effb 100644 --- a/src/compiler/glsl/glsl_symbol_table.cpp +++ b/src/compiler/glsl/glsl_symbol_table.cpp @@ -106,6 +106,7 @@ glsl_symbol_table::glsl_symbol_table() this->separate_function_namespace = false; this->table = _mesa_symbol_table_ctor(); this->mem_ctx = ralloc_context(NULL); + this->linalloc = linear_alloc_parent(this->mem_ctx, 0); } glsl_symbol_table::~glsl_symbol_table() @@ -207,7 +208,7 @@ bool glsl_symbol_table::add_default_precision_qualifier(const char *type_name, { char *name = ralloc_asprintf(mem_ctx, "#default_precision_%s", type_name); - ast_type_specifier *default_specifier = new(mem_ctx) ast_type_specifier(name); + ast_type_specifier *default_specifier = new(linalloc) ast_type_specifier(name); default_specifier->default_precision = precision; symbol_table_entry *entry = |