]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/resolve.h
Use extended alignment in SPIR-V struct layout when necessary
[libs/gl.git] / source / glsl / resolve.h
index 10322d49f67e89d80f61b994177f18c1b2b0588b..92a7c336de71fbbb8a217dd7ece8dd29040c4ea2 100644 (file)
@@ -30,7 +30,7 @@ class TypeResolver: private TraversingVisitor
 private:
        Stage *stage = 0;
        std::map<TypeDeclaration *, TypeDeclaration *> alias_map;
-       std::map<TypeDeclaration *, TypeDeclaration *> array_types;
+       std::map<std::pair<TypeDeclaration *, bool>, TypeDeclaration *> array_types;
        NodeList<Statement>::iterator type_insert_point;
        InterfaceBlock *iface_block = 0;
        bool r_any_resolved = false;
@@ -102,6 +102,7 @@ private:
        };
 
        Stage *stage = 0;
+       const FunctionDeclaration *current_function = 0;
        std::vector<BasicTypeDeclaration *> basic_types;
        NodeList<Statement>::iterator insert_point;
        bool r_any_resolved = false;
@@ -133,6 +134,8 @@ private:
        virtual void visit(FunctionCall &);
        virtual void visit(BasicTypeDeclaration &);
        virtual void visit(VariableDeclaration &);
+       virtual void visit(FunctionDeclaration &);
+       virtual void visit(Return &);
 };
 
 /** Resolves function declarations and calls. */