]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/spirv.h
Use extended alignment in SPIR-V struct layout when necessary
[libs/gl.git] / source / glsl / spirv.h
index 59c7b50b0cc45fede654eff5d3580840c5eecf1a..a83478b0fb6d370d621864aa300ed8fcf4c8f1bd 100644 (file)
@@ -70,6 +70,7 @@ private:
                bool operator<(const ConstantKey &) const;
        };
 
+       Features features;
        Stage *stage = 0;
        FunctionDeclaration *current_function = 0;
        std::vector<const InterfaceLayout *> interface_layouts;
@@ -106,7 +107,7 @@ private:
 public:
        SpirVGenerator();
 
-       void apply(Module &);
+       void apply(Module &, const Features &);
        const std::vector<Word> &get_code() const { return content.code; }
 
 private:
@@ -123,7 +124,7 @@ private:
        Id get_vector_constant_id(Id, unsigned, Id);
        Id get_standard_type_id(BasicTypeDeclaration::Kind, unsigned, bool = true);
        bool is_scalar_type(Id, BasicTypeDeclaration::Kind) const;
-       Id get_array_type_id(TypeDeclaration &, unsigned);
+       Id get_array_type_id(TypeDeclaration &, Id, bool);
        Id get_pointer_type_id(Id, StorageClass);
        Id get_variable_type_id(const VariableDeclaration &);
        Id get_load_id(VariableDeclaration &);