]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Further refactor block and scope management
[libs/gl.git] / source / glsl / compiler.cpp
index 02f4ea13b7fbe864245898af9658b40d3e81116d..db9017cfb675745779ca45e7654f092ad9d868e6 100644 (file)
@@ -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,7 @@ bool Compiler::optimize(Stage &stage)
        ConstantConditionEliminator().apply(stage);
 
        FunctionInliner().apply(stage);
+       BlockResolver().apply(stage);
        VariableResolver().apply(stage);
 
        bool result = UnusedVariableRemover().apply(stage);