]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.h
Support inlining GLSL functions with parameters
[libs/gl.git] / source / glsl / optimize.h
index f6604743810ff1e275198ee554badcd53a75ffa2..6d4b1bcb5d2c2e5d883d7ab640390481c8c7e84e 100644 (file)
@@ -10,8 +10,8 @@ namespace GL {
 namespace SL {
 
 /** Finds functions which are candidates for inlining.  Currently this means
-functions which have no parameters, contain no more than one return statement,
-and are only called once. */
+functions which have no flow control statements, no more than one return
+statement, and are only called once. */
 class InlineableFunctionLocator: private TraversingVisitor
 {
 private:
@@ -59,7 +59,7 @@ private:
 public:
        InlineContentInjector();
 
-       const std::string &apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionDeclaration &);
+       const std::string &apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionCall &);
 
 private:
        virtual void visit(VariableReference &);