]> 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 0f608d6d600313682577df96a3c7e2cccd2e5226..2a71cfe4e23ff49eb8914aee64639a4e5c19dec5 100644 (file)
@@ -259,6 +259,7 @@ void Compiler::generate(Stage &stage, Mode mode)
 
 bool Compiler::validate(Stage &stage)
 {
+       TypeValidator().apply(stage);
        DeclarationValidator().apply(stage);
        ReferenceValidator().apply(stage);
 
@@ -286,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;
 }