]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Recognize unknown index as matching any index
[libs/gl.git] / source / glsl / compiler.cpp
index 41734fe85fdb6d170765353653038a6df9183f43..4b1d4edf11d0e6e29c8410ab123521b440826128 100644 (file)
@@ -25,17 +25,11 @@ namespace GL {
 namespace SL {
 
 Compiler::Compiler():
-       features(DeviceInfo::get_global().glsl_features),
-       module(0),
-       compiled(false),
-       specialized(false)
+       features(DeviceInfo::get_global().glsl_features)
 { }
 
 Compiler::Compiler(const Features &f):
-       features(f),
-       module(0),
-       compiled(false),
-       specialized(false)
+       features(f)
 { }
 
 Compiler::~Compiler()
@@ -369,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);