X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompiler.h;fp=source%2Fglsl%2Fcompiler.h;h=64cbac4f7cefd801d1c8f38667d488995a0cd6da;hb=f7b29fcfe408965c9cba79095eb05c49eca4a98e;hp=1f3cbee4698c466a7b88b562d56373f7f9b0fb6e;hpb=9ec831710f64a62ad5f2e896a55ae82a3519f29e;p=libs%2Fgl.git diff --git a/source/glsl/compiler.h b/source/glsl/compiler.h index 1f3cbee4..64cbac4f 100644 --- a/source/glsl/compiler.h +++ b/source/glsl/compiler.h @@ -21,6 +21,12 @@ public: }; private: + enum OptimizeResult + { + NEXT_STAGE, + REDO_PREVIOUS + }; + Features features; Module *module; std::vector imported_names; @@ -102,9 +108,9 @@ private: variables. */ void generate(Stage &, Mode); - /** Applies optimizations to a stage. The return value indicates if the - preceding stage should be processed again. */ - bool optimize(Stage &); + /** Applies optimizations to a stage. The return value indicates which + stage should be optimized next. */ + OptimizeResult optimize(Stage &); /** Performs final adjustments on a stage after compilation. */ void finalize(Stage &, Mode);