/* Treat function calls as having side effects so expression statements
consisting of nothing but a function call won't be optimized away. */
r_side_effects = true;
+
+ if(stage->type==Stage::GEOMETRY && call.name=="EmitVertex")
+ {
+ for(map<Statement *, VariableInfo>::const_iterator i=variables.begin(); i!=variables.end(); ++i)
+ if(i->second.output)
+ referenced(i->first, call);
+ }
}
void UnusedVariableRemover::record_assignment(const Assignment::Target &target, Node &node)