From c17c7903871b031162e41d6495a1bef64844e19b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 6 Dec 2010 10:54:21 -0800 Subject: glsl: Properly add functions during lazy built-in prototype importing. The original lazy built-in importing patch did not add the newly created function to the symbol table, nor actually emit it into the IR stream. Adding it to the symbol table is non-trivial since importing occurs when generating some ir_call in a nested scope. A new add_global_function method, backed by new symbol_table code in the previous patch, handles this. Fixes bug #32030. --- src/glsl/glsl_symbol_table.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/glsl/glsl_symbol_table.h') diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h index 329cd106b1..28a44ebe91 100644 --- a/src/glsl/glsl_symbol_table.h +++ b/src/glsl/glsl_symbol_table.h @@ -102,6 +102,11 @@ public: bool add_function(ir_function *f); /*@}*/ + /** + * Add an function at global scope without checking for scoping conflicts. + */ + void add_global_function(ir_function *f); + /** * \name Methods to get symbols from the table */ -- cgit v1.2.3