]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/generate.cpp
Avoid incorrectly matching interfaces in certain cases
[libs/gl.git] / source / glsl / generate.cpp
index ca4d41e64c7a8c63bf51fd8d446e5ccb4dc8bd5a..952f1f0bfa4f1bddb2e1bc7585f3829fda9ce78b 100644 (file)
@@ -358,6 +358,10 @@ void InterfaceGenerator::visit(VariableReference &var)
 {
        if(var.declaration || !stage->previous)
                return;
+       /* Don't pull a variable from previous stage if we just generated an out
+       interface in this stage */
+       if(stage->out_variables.count(var.name))
+               return;
 
        const map<string, VariableDeclaration *> &prev_out = stage->previous->out_variables;
        map<string, VariableDeclaration *>::const_iterator i = prev_out.find(var.name);