From: Mikko Rasa Date: Wed, 3 Mar 2021 15:10:03 +0000 (+0200) Subject: Fix passthroughs being generated for non-output variables X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=11ce239520e60df331ef635b9e210204d80de746;p=libs%2Fgl.git Fix passthroughs being generated for non-output variables --- diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index 38eda220..9adfb93d 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -606,11 +606,10 @@ void InterfaceGenerator::visit(Passthrough &pass) const map &prev_vars = stage->previous->content.variables; for(map::const_iterator i=prev_vars.begin(); i!=prev_vars.end(); ++i) { - bool linked = false; - for(vector::const_iterator j=pass_vars.begin(); (!linked && j!=pass_vars.end()); ++j) - linked = ((*j)->linked_declaration==i->second); + if(i->second->interface!="out") + continue; - if(!linked && generate_interface(*i->second, "in", i->second->name)) + if(!i->second->linked_declaration && generate_interface(*i->second, "in", i->second->name)) pass_vars.push_back(i->second); } }