]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.h
Don't dismantle aggregates which are function parameters
[libs/gl.git] / source / glsl / optimize.h
index 1eb0464e7daea97d654576c15792a13e764d8c27..b8ab3201ccc54aa74fc603fce30caf8b5bd6b683 100644 (file)
@@ -161,6 +161,7 @@ private:
        struct AggregateMember
        {
                const VariableDeclaration *declaration = 0;
+               unsigned index = 0;
                RefPtr<Expression> initializer;
                std::vector<RefPtr<Expression> *> references;
        };
@@ -194,6 +195,7 @@ private:
        virtual void visit(StructDeclaration &) { }
        virtual void visit(VariableDeclaration &);
        virtual void visit(InterfaceBlock &) { }
+       virtual void visit(FunctionDeclaration &);
 };
 
 /** Replaces expressions consisting entirely of literals with the results of