diff options
author | Paul Berry <[email protected]> | 2012-08-01 17:44:02 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-12-06 12:13:21 -0800 |
commit | 53e572f15cb394a8d4f2cd5856dd2a06b6ccd3f0 (patch) | |
tree | 4ea5a88d76cc8fff693b00747c3f526d60cea23b /src/glsl/glsl_symbol_table.cpp | |
parent | 9a93ba306878693d9157d204743a82becbd5d53e (diff) |
glsl: Simplify symbol table version checking.
Previously, we stored the GLSL language version in the
glsl_symbol_table struct. But this was unnecessary--all
glsl_symbol_table needs to know is whether functions and variables
have separate namespaces (they do in GLSL 1.10 only).
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Acked-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/glsl/glsl_symbol_table.cpp')
-rw-r--r-- | src/glsl/glsl_symbol_table.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp index bcb65d30182..f934ea86570 100644 --- a/src/glsl/glsl_symbol_table.cpp +++ b/src/glsl/glsl_symbol_table.cpp @@ -52,7 +52,7 @@ public: glsl_symbol_table::glsl_symbol_table() { - this->language_version = 120; + this->separate_function_namespace = false; this->table = _mesa_symbol_table_ctor(); this->mem_ctx = ralloc_context(NULL); } @@ -80,7 +80,7 @@ bool glsl_symbol_table::name_declared_this_scope(const char *name) bool glsl_symbol_table::add_variable(ir_variable *v) { - if (this->language_version == 110) { + if (this->separate_function_namespace) { /* In 1.10, functions and variables have separate namespaces. */ symbol_table_entry *existing = get_entry(v->name); if (name_declared_this_scope(v->name)) { @@ -120,7 +120,7 @@ bool glsl_symbol_table::add_type(const char *name, const glsl_type *t) bool glsl_symbol_table::add_function(ir_function *f) { - if (this->language_version == 110 && name_declared_this_scope(f->name)) { + if (this->separate_function_namespace && name_declared_this_scope(f->name)) { /* In 1.10, functions and variables have separate namespaces. */ symbol_table_entry *existing = get_entry(f->name); if ((existing->f == NULL) && (existing->t == NULL)) { |