OSDN Git Service

glsl: Properly add functions during lazy built-in prototype importing.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 6 Dec 2010 18:54:21 +0000 (10:54 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 6 Dec 2010 21:43:22 +0000 (13:43 -0800)
commitc17c7903871b031162e41d6495a1bef64844e19b
treed3a89af48859453542f8e44f2fcc8c78a19c248e
parenta8f52647b045b5400ebcfc58ba235599a6e9ad87
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/ast_function.cpp
src/glsl/glsl_symbol_table.cpp
src/glsl/glsl_symbol_table.h