]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/resolve.h
Add support for storage images in shaders
[libs/gl.git] / source / glsl / resolve.h
index a11b849e251acafd887061521ea9e51bf0369141..d592e4efd5a60ddaea72b0533db48474abfe8df8 100644 (file)
@@ -31,6 +31,7 @@ private:
        Stage *stage = 0;
        std::map<TypeDeclaration *, TypeDeclaration *> alias_map;
        std::map<std::pair<TypeDeclaration *, bool>, TypeDeclaration *> array_types;
+       std::map<std::pair<ImageTypeDeclaration *, std::string>, ImageTypeDeclaration *> image_types;
        NodeList<Statement>::iterator type_insert_point;
        NodeList<Statement>::iterator block_member_type_ins_pt;
        VariableDeclaration *iface_block = 0;
@@ -41,7 +42,8 @@ public:
 
 private:
        TypeDeclaration *get_or_create_array_type(TypeDeclaration &);
-       void resolve_type(TypeDeclaration *&, const std::string &, bool);
+       TypeDeclaration *get_or_create_image_type(ImageTypeDeclaration &, const std::string &);
+       void resolve_type(TypeDeclaration *&, const std::string &, bool, const Layout * = 0);
        virtual void visit(Block &);
        virtual void visit(BasicTypeDeclaration &);
        virtual void visit(ImageTypeDeclaration &);