]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Remove a debug thing
[libs/gl.git] / source / glsl / compiler.cpp
index 0f608d6d600313682577df96a3c7e2cccd2e5226..9083ece3fb019681a33974a4ed46c41b15bfb296 100644 (file)
@@ -86,7 +86,7 @@ void Compiler::compile(Mode mode)
                throw invalid_shader_source(get_diagnostics());
 
        unsigned n = 0;
-       for(list<Stage>::iterator i=module->stages.begin(); (i!=module->stages.end() && n<10000); ++n)
+       for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++n)
        {
                OptimizeResult result = optimize(*i);
                if(result==REDO_PREVIOUS)
@@ -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;
 }