]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/syntax.h
Use extended alignment in SPIR-V struct layout when necessary
[libs/gl.git] / source / glsl / syntax.h
index d3797ac415ecb73c222220c1596a82c7fb2b9fed..7a372dc59e2402d5f1872da7aa24415c66c1e783 100644 (file)
@@ -354,6 +354,7 @@ struct BasicTypeDeclaration: TypeDeclaration
        Kind kind = ALIAS;
        unsigned size = 0;
        bool sign = true;
+       bool extended_alignment = false;
        std::string base;
 
        TypeDeclaration *base_type = 0;
@@ -390,6 +391,7 @@ struct ImageTypeDeclaration: TypeDeclaration
 struct StructDeclaration: TypeDeclaration
 {
        Block members;
+       bool extended_alignment = false;
 
        InterfaceBlock *interface_block = 0;
 
@@ -525,7 +527,7 @@ struct Stage
        };
 
        Type type;
-       Stage *previous;
+       Stage *previous = 0;
        Block content;
        std::map<std::string, TypeDeclaration *> types;
        std::map<std::string, InterfaceBlock *> interface_blocks;
@@ -552,9 +554,12 @@ struct Module
 };
 
 std::string get_unused_variable_name(const Block &, const std::string &);
-
-int get_layout_value(const Layout &, const std::string &, int = -1);
+const TypeDeclaration *get_ultimate_base_type(const TypeDeclaration *);
+bool has_layout_qualifier(const Layout *, const std::string &);
+int get_layout_value(const Layout *, const std::string &, int = -1);
+void add_layout_qualifier(RefPtr<Layout> &, const Layout::Qualifier &);
 void add_to_chain(Assignment::Target &, Assignment::Target::ChainType, unsigned);
+bool targets_overlap(const Assignment::Target &, const Assignment::Target &);
 
 } // namespace SL
 } // namespace GL