]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Actually call the type validator
[libs/gl.git] / source / glsl / compiler.cpp
index f5540139e3391cffd1afd1b9f2f8e709fa4b99d5..2a71cfe4e23ff49eb8914aee64639a4e5c19dec5 100644 (file)
@@ -259,7 +259,9 @@ void Compiler::generate(Stage &stage, Mode mode)
 
 bool Compiler::validate(Stage &stage)
 {
+       TypeValidator().apply(stage);
        DeclarationValidator().apply(stage);
+       ReferenceValidator().apply(stage);
 
        for(vector<Diagnostic>::const_iterator i=stage.diagnostics.begin(); i!=stage.diagnostics.end(); ++i)
                if(i->severity==Diagnostic::ERR)
@@ -285,6 +287,7 @@ Compiler::OptimizeResult Compiler::optimize(Stage &stage)
        to become unused. */
        bool any_removed = UnusedVariableRemover().apply(stage);
        any_removed |= UnusedFunctionRemover().apply(stage);
+       any_removed |= UnusedTypeRemover().apply(stage);
 
        return any_removed ? REDO_PREVIOUS : any_inlined ? REDO_STAGE : NEXT_STAGE;
 }