]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Break up struct variables if they're not used as a whole
[libs/gl.git] / source / glsl / compiler.cpp
index 506fba1c417c62657ee98292febc5102a5a752cd..4b1d4edf11d0e6e29c8410ab123521b440826128 100644 (file)
@@ -363,6 +363,11 @@ Compiler::OptimizeResult Compiler::optimize(Stage &stage)
                resolve(stage, RESOLVE_TYPES|RESOLVE_VARIABLES|RESOLVE_FUNCTIONS|RESOLVE_EXPRESSIONS);
                any_inlined = true;
        }
+       if(AggregateDismantler().apply(stage))
+       {
+               resolve(stage, RESOLVE_TYPES|RESOLVE_VARIABLES|RESOLVE_FUNCTIONS|RESOLVE_EXPRESSIONS);
+               any_inlined = true;
+       }
        if(ExpressionInliner().apply(stage))
        {
                resolve(stage, RESOLVE_VARIABLES|RESOLVE_FUNCTIONS|RESOLVE_EXPRESSIONS);