1 #ifndef MSP_GL_SL_COMPATIBILITY_H_
2 #define MSP_GL_SL_COMPATIBILITY_H_
11 class DefaultPrecisionGenerator: private BlockModifier
14 Stage::Type stage_type;
16 std::set<std::string> have_default;
19 DefaultPrecisionGenerator();
24 virtual void visit(Block &);
25 virtual void visit(Precision &);
26 virtual void visit(VariableDeclaration &);
27 using BlockModifier::visit;
30 class PrecisionRemover: private BlockModifier
33 void apply(Stage &s) { visit(s.content); }
36 virtual void visit(Precision &);
37 virtual void visit(VariableDeclaration &);
38 using BlockModifier::visit;
41 class LegacyConverter: private BlockModifier
46 Version target_version;
48 VariableDeclaration *frag_out;
52 LegacyConverter(const Version &);
54 virtual void apply(Stage &);
57 bool check_version(const Version &) const;
58 bool check_extension(const Extension &) const;
59 bool supports_unified_interface_syntax() const;
60 virtual void visit(VariableReference &);
61 virtual void visit(Assignment &);
62 bool supports_unified_sampling_functions() const;
63 virtual void visit(FunctionCall &);
64 bool supports_interface_layouts() const;
65 bool supports_centroid_sampling() const;
66 bool supports_sample_sampling() const;
67 virtual void visit(VariableDeclaration &);
68 bool supports_interface_blocks(const std::string &) const;
69 virtual void visit(InterfaceBlock &);
70 using BlockModifier::visit;