I removed this in
ab5f2e6, thinking it was unnecessary. But if a stage
declares a local output variable of the same name as an output variable
in the previous stage, this is needed to avoid a mismatch.
{
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);