From: Mikko Rasa Date: Wed, 3 Mar 2021 17:47:53 +0000 (+0200) Subject: Remove some unnecessary bits X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d1da983b2ddfd221ef4348d2c40736264670c2b5;p=libs%2Fgl.git Remove some unnecessary bits --- diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index afa6394e..56ff34d2 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -583,7 +583,7 @@ void UnusedVariableRemover::merge_down_variables() { if(!i->second.referenced) unused_nodes.insert(i->first); - clear_assignments(i->second, i->first->interface!="out"); + clear_assignments(i->second, true); continue; } @@ -639,12 +639,6 @@ void UnusedVariableRemover::visit(Iteration &iter) { variables.push_back(BlockVariableMap()); TraversingVisitor::visit(iter); - - BlockVariableMap &block_variables = variables.back(); - for(BlockVariableMap::iterator i=block_variables.begin(); i!=block_variables.end(); ++i) - if(!i->second.local && i->second.referenced) - clear_assignments(i->second, false); - merge_down_variables(); }