X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Foptimize.cpp;h=dfb17b26799bc2845d063ad9618356f2f80be8d9;hb=05597fbb3671dfed4776bc5223958c85e780345e;hp=c76cae1b50f34a69ade9d31ead0c563250d24ae6;hpb=1fa69bb8eec3070f5da296d6dd0bd67aea62d3bf;p=libs%2Fgl.git diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index c76cae1b..dfb17b26 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -39,10 +39,6 @@ void InlineableFunctionLocator::visit(FunctionDeclaration &func) } -FunctionInliner::FunctionInliner(): - extract_result(0) -{ } - FunctionInliner::FunctionInliner(const set &in): inlineable(in), extract_result(0) @@ -217,14 +213,14 @@ UnusedVariableLocator::UnusedVariableLocator(): global_scope(true) { } -const set &UnusedVariableLocator::apply(Stage &s) +const set &UnusedVariableRemover::apply(Stage &stage) { variables.push_back(BlockVariableMap()); - visit(s.content); + visit(stage.content); BlockVariableMap &global_variables = variables.back(); for(BlockVariableMap::iterator i=global_variables.begin(); i!=global_variables.end(); ++i) { - if(i->first->interface=="out" && (s.type==Stage::FRAGMENT || i->first->linked_declaration || !i->first->name.compare(0, 3, "gl_"))) + if(i->first->interface=="out" && (stage.type==Stage::FRAGMENT || i->first->linked_declaration || !i->first->name.compare(0, 3, "gl_"))) continue; if(!i->second.referenced) {