X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fspirv.h;h=a83478b0fb6d370d621864aa300ed8fcf4c8f1bd;hb=fea5f2abec9b8e971d8467804f379cfcd81e9ff7;hp=59c7b50b0cc45fede654eff5d3580840c5eecf1a;hpb=f7682c3c2e9f028cef6945ffbada66cff33585c0;p=libs%2Fgl.git diff --git a/source/glsl/spirv.h b/source/glsl/spirv.h index 59c7b50b..a83478b0 100644 --- a/source/glsl/spirv.h +++ b/source/glsl/spirv.h @@ -70,6 +70,7 @@ private: bool operator<(const ConstantKey &) const; }; + Features features; Stage *stage = 0; FunctionDeclaration *current_function = 0; std::vector interface_layouts; @@ -106,7 +107,7 @@ private: public: SpirVGenerator(); - void apply(Module &); + void apply(Module &, const Features &); const std::vector &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 &);