char extension[13];
Word opcode;
UInt8 arg_order[4];
+ Word capability;
void (SpirVGenerator::*handler)(FunctionCall &, const std::vector<Id> &);
};
unsigned detail;
TypeKey(Id i, unsigned d): type_id(i), detail(d) { }
+ TypeKey(BasicTypeDeclaration::Kind, bool);
bool operator<(const TypeKey &) const;
};
};
ConstantKey(Id t, int i): type_id(t), int_value(i) { }
+ ConstantKey(Id t, unsigned u): type_id(t), int_value(u) { }
ConstantKey(Id t, float f): type_id(t), float_value(f) { }
bool operator<(const ConstantKey &) const;
std::map<Node *, Declaration> declared_ids;
std::map<std::string, Id> declared_uniform_ids;
std::map<TypeKey, Id> standard_type_ids;
+ std::map<Id, Id> image_type_ids;
std::map<TypeKey, Id> array_type_ids;
std::map<TypeKey, Id> pointer_type_ids;
std::map<std::string, Id> function_type_ids;
std::map<const VariableDeclaration *, Id> variable_load_ids;
Id next_id;
Id r_expression_result_id;
+ bool r_constant_result;
bool constant_expression;
bool spec_constant;
bool reachable;
Id import_extension(const std::string &);
Id get_id(Node &) const;
Id allocate_id(Node &, Id);
+ Id allocate_forward_id(Node &);
Id write_constant(Id, Word, bool);
static ConstantKey get_constant_key(Id, const Variant &value);
Id get_constant_id(Id, const Variant &value);
Id get_vector_constant_id(Id, unsigned, Id);
- Id get_standard_type_id(BasicTypeDeclaration::Kind, unsigned);
+ 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_pointer_type_id(Id, StorageClass);
Id write_expression(Opcode, Id, Id, Id);
void write_deconstruct(Id, Id, Id *, unsigned);
Id write_construct(Id, const Id *, unsigned);
- static BasicTypeDeclaration &get_element_type(BasicTypeDeclaration &);
virtual void visit(Block &);
virtual void visit(Literal &);
virtual void visit(Assignment &);
virtual void visit(TernaryExpression &);
virtual void visit(FunctionCall &);
- void visit_constructor(FunctionCall &, const std::vector<Id> &);
+ void visit_constructor(FunctionCall &, const std::vector<Id> &, bool);
void visit_builtin_matrix_comp_mult(FunctionCall &, const std::vector<Id> &);
+ void visit_builtin_texture_query(FunctionCall &, const std::vector<Id> &);
void visit_builtin_texture(FunctionCall &, const std::vector<Id> &);
void visit_builtin_texel_fetch(FunctionCall &, const std::vector<Id> &);
void visit_builtin_interpolate(FunctionCall &, const std::vector<Id> &);