]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.h
Clarify SL::Compiler::optimize return values by using an enum
[libs/gl.git] / source / glsl / compiler.h
index 1f3cbee4698c466a7b88b562d56373f7f9b0fb6e..64cbac4f7cefd801d1c8f38667d488995a0cd6da 100644 (file)
@@ -21,6 +21,12 @@ public:
        };
 
 private:
+       enum OptimizeResult
+       {
+               NEXT_STAGE,
+               REDO_PREVIOUS
+       };
+
        Features features;
        Module *module;
        std::vector<std::string> 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);