]> git.tdb.fi Git - libs/gl.git/commitdiff
Remove some unnecessary bits
authorMikko Rasa <tdb@tdb.fi>
Wed, 3 Mar 2021 17:47:53 +0000 (19:47 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 4 Mar 2021 00:26:15 +0000 (02:26 +0200)
source/glsl/optimize.cpp

index afa6394e19018a4766cb3c05252f97d18700bbbc..56ff34d2fd883eb93dcb3dee629c678814e86e0a 100644 (file)
@@ -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();
 }