X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompiler.cpp;h=db9017cfb675745779ca45e7654f092ad9d868e6;hb=99719790df8a1215465a68c7b1d87a495bff87eb;hp=35977cb42be534077bca6c9f3427fbbcc158d443;hpb=ff8a0248f1a3c0c1f48f670867bc9106c898c55b;p=libs%2Fgl.git diff --git a/source/glsl/compiler.cpp b/source/glsl/compiler.cpp index 35977cb4..db9017cf 100644 --- a/source/glsl/compiler.cpp +++ b/source/glsl/compiler.cpp @@ -171,6 +171,7 @@ void Compiler::generate(Stage &stage) inject_block(stage.content, module->shared.content); DeclarationReorderer().apply(stage); + BlockResolver().apply(stage); FunctionResolver().apply(stage); VariableResolver().apply(stage); InterfaceGenerator().apply(stage); @@ -185,6 +186,8 @@ bool Compiler::optimize(Stage &stage) ConstantConditionEliminator().apply(stage); FunctionInliner().apply(stage); + BlockResolver().apply(stage); + VariableResolver().apply(stage); bool result = UnusedVariableRemover().apply(stage); result |= UnusedFunctionRemover().apply(stage);