X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.cpp;h=952f1f0bfa4f1bddb2e1bc7585f3829fda9ce78b;hb=fcec789963b25a49a187e2df248d80e1287ebc44;hp=ca4d41e64c7a8c63bf51fd8d446e5ccb4dc8bd5a;hpb=5c33b56c3b97ca0381ac216a603c7553f4bea499;p=libs%2Fgl.git diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index ca4d41e6..952f1f0b 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -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 &prev_out = stage->previous->out_variables; map::const_iterator i = prev_out.find(var.name);