From d1da983b2ddfd221ef4348d2c40736264670c2b5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 3 Mar 2021 19:47:53 +0200 Subject: [PATCH] Remove some unnecessary bits --- source/glsl/optimize.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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(); } -- 2.45.2