summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_symbol_table.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-01-21 23:01:33 -0500
committerIan Romanick <[email protected]>2013-01-25 09:07:34 -0500
commit5383661092fc46cf7013052210e6d624f4d5b596 (patch)
tree0997c7806b795f6db0e75395edf752c5e605331b /src/glsl/glsl_symbol_table.cpp
parent9a204bb9f611e34396ea838b44517dd6eeb99bcc (diff)
glsl: Track blocks in the symbol table using the glsl_type instead of the gl_uniform_block
Eventually the gl_uniform_block information won't be calculated until linking. Block names need to be checked for name clashes during compiling, so we have to track it differently. v2: Update the commit message. Suggested by Carl Worth. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/glsl_symbol_table.cpp')
-rw-r--r--src/glsl/glsl_symbol_table.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index eb275b12e29..8d34547c6ff 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -41,15 +41,13 @@ public:
ralloc_free(entry);
}
- symbol_table_entry(ir_variable *v) : v(v), f(0), t(0), u(0) {}
- symbol_table_entry(ir_function *f) : v(0), f(f), t(0), u(0) {}
- symbol_table_entry(const glsl_type *t) : v(0), f(0), t(t), u(0) {}
- symbol_table_entry(struct gl_uniform_block *u) : v(0), f(0), t(0), u(u) {}
+ symbol_table_entry(ir_variable *v) : v(v), f(0), t(0) {}
+ symbol_table_entry(ir_function *f) : v(0), f(f), t(0) {}
+ symbol_table_entry(const glsl_type *t) : v(0), f(0), t(t) {}
ir_variable *v;
ir_function *f;
const glsl_type *t;
- struct gl_uniform_block *u;
};
glsl_symbol_table::glsl_symbol_table()
@@ -134,12 +132,6 @@ bool glsl_symbol_table::add_function(ir_function *f)
return _mesa_symbol_table_add_symbol(table, -1, f->name, entry) == 0;
}
-bool glsl_symbol_table::add_uniform_block(struct gl_uniform_block *u)
-{
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(u);
- return _mesa_symbol_table_add_symbol(table, -1, u->Name, entry) == 0;
-}
-
void glsl_symbol_table::add_global_function(ir_function *f)
{
symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);