X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompiler.cpp;h=66a487fbccd4b7a63f2575295ecc03fcbfcddf5a;hb=50ab5ca;hp=2a71cfe4e23ff49eb8914aee64639a4e5c19dec5;hpb=61c8a3f2f3a39d17fe90ee7b2bce93e771f58a03;p=libs%2Fgl.git diff --git a/source/glsl/compiler.cpp b/source/glsl/compiler.cpp index 2a71cfe4..66a487fb 100644 --- a/source/glsl/compiler.cpp +++ b/source/glsl/compiler.cpp @@ -86,7 +86,7 @@ void Compiler::compile(Mode mode) throw invalid_shader_source(get_diagnostics()); unsigned n = 0; - for(list::iterator i=module->stages.begin(); (i!=module->stages.end() && n<10000); ++n) + for(list::iterator i=module->stages.begin(); i!=module->stages.end(); ++n) { OptimizeResult result = optimize(*i); if(result==REDO_PREVIOUS) @@ -250,6 +250,7 @@ void Compiler::generate(Stage &stage, Mode mode) InterfaceGenerator().apply(stage); TypeResolver().apply(stage); VariableResolver().apply(stage); + ExpressionResolver().apply(stage); FunctionResolver().apply(stage); ConstantSpecializer().apply(stage, (mode==PROGRAM && specialized ? &spec_values : 0)); @@ -262,6 +263,7 @@ bool Compiler::validate(Stage &stage) TypeValidator().apply(stage); DeclarationValidator().apply(stage); ReferenceValidator().apply(stage); + ExpressionValidator().apply(stage); for(vector::const_iterator i=stage.diagnostics.begin(); i!=stage.diagnostics.end(); ++i) if(i->severity==Diagnostic::ERR) @@ -281,6 +283,7 @@ Compiler::OptimizeResult Compiler::optimize(Stage &stage) TypeResolver().apply(stage); VariableResolver().apply(stage); FunctionResolver().apply(stage); + ExpressionResolver().apply(stage); } /* Removing variables or functions may cause things from the previous stage