]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/generate.cpp
Clear the stage map at the beginning if a resolving pass
[libs/gl.git] / source / glsl / generate.cpp
index f93446b90a7d05dcbf50482a42b3aefe83710d46..fe053ade254c3105d80771a72d575b264583946a 100644 (file)
@@ -126,6 +126,8 @@ VariableResolver::VariableResolver():
 void VariableResolver::apply(Stage &s)
 {
        stage = &s;
+       s.types.clear();
+       s.interface_blocks.clear();
        Stage *builtin_stage = get_builtins(s.type);
        builtins = (builtin_stage ? &builtin_stage->content : 0);
        s.content.visit(*this);
@@ -306,6 +308,7 @@ void VariableResolver::visit(InterfaceBlock &iface)
 void FunctionResolver::apply(Stage &s)
 {
        stage = &s;
+       s.functions.clear();
        s.content.visit(*this);
 }