X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompiler.cpp;h=7ff589e7050bc854c1e3b3fd5856c42ea852405d;hb=1cd0ea7;hp=55a69f0df38ecaf1b681f9a698e6bbc2abed02da;hpb=518f751d385b733adbf43fe4056403740709edec;p=libs%2Fgl.git diff --git a/source/glsl/compiler.cpp b/source/glsl/compiler.cpp index 55a69f0d..7ff589e7 100644 --- a/source/glsl/compiler.cpp +++ b/source/glsl/compiler.cpp @@ -244,8 +244,12 @@ Compiler::OptimizeResult Compiler::optimize(Stage &stage) ConstantConditionEliminator().apply(stage); bool any_inlined = FunctionInliner().apply(stage); - BlockHierarchyResolver().apply(stage); - VariableResolver().apply(stage); + any_inlined |= ExpressionInliner().apply(stage); + if(any_inlined) + { + VariableResolver().apply(stage); + FunctionResolver().apply(stage); + } /* Removing variables or functions may cause things from the previous stage to become unused. */