bool operator<(const ConstantKey &) const;
};
+ Features features;
Stage *stage = 0;
FunctionDeclaration *current_function = 0;
std::vector<const InterfaceLayout *> interface_layouts;
public:
SpirVGenerator();
- void apply(Module &);
+ void apply(Module &, const Features &);
const std::vector<Word> &get_code() const { return content.code; }
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 &);