Lines Matching +full:cap +full:- +full:std
4 * Use of this source code is governed by a BSD-style license that can be
24 virtual std::unique_ptr<Expression> value(const Context& context) const = 0;
36 std::unique_ptr<Expression> value(const Context& context) const override { in value()
37 return Literal::MakeBool(context, /*line=*/-1, (context.fCaps.*fGetCap)()); in value()
53 std::unique_ptr<Expression> value(const Context& context) const override { in value()
54 return Literal::MakeInt(context, /*line=*/-1, (context.fCaps.*fGetCap)()); in value()
63 using Pair = std::pair<const char*, CapsLookupMethod*>;
65 CapsLookupTable(std::initializer_list<Pair> capsLookups) { in CapsLookupTable()
67 fMap[entry.first] = std::unique_ptr<CapsLookupMethod>(entry.second); in CapsLookupTable()
73 return (iter != fMap.end()) ? iter->second.get() : nullptr; in lookup()
77 std::unordered_map<skstd::string_view, std::unique_ptr<CapsLookupMethod>> fMap;
83 #define CAP(T, name) CapsLookupTable::Pair{#name, new T##CapsLookup{&ShaderCapsClass::name}} in caps_lookup_table() macro
84 CAP(Bool, fbFetchSupport), in caps_lookup_table()
85 CAP(Bool, fbFetchNeedsCustomOutput), in caps_lookup_table()
86 CAP(Bool, flatInterpolationSupport), in caps_lookup_table()
87 CAP(Bool, noperspectiveInterpolationSupport), in caps_lookup_table()
88 CAP(Bool, externalTextureSupport), in caps_lookup_table()
89 CAP(Bool, mustEnableAdvBlendEqs), in caps_lookup_table()
90 CAP(Bool, mustDeclareFragmentShaderOutput), in caps_lookup_table()
91 CAP(Bool, mustDoOpBetweenFloorAndAbs), in caps_lookup_table()
92 CAP(Bool, mustGuardDivisionEvenAfterExplicitZeroCheck), in caps_lookup_table()
93 CAP(Bool, atan2ImplementedAsAtanYOverX), in caps_lookup_table()
94 CAP(Bool, canUseAnyFunctionInShader), in caps_lookup_table()
95 CAP(Bool, floatIs32Bits), in caps_lookup_table()
96 CAP(Bool, integerSupport), in caps_lookup_table()
97 CAP(Bool, builtinFMASupport), in caps_lookup_table()
98 CAP(Bool, builtinDeterminantSupport), in caps_lookup_table()
99 CAP(Bool, rewriteMatrixVectorMultiply), in caps_lookup_table()
100 #undef CAP in caps_lookup_table()
109 return caps->type(context); in get_type()
112 context.fErrors->error(line, "unknown capability flag '" + name + "'"); in get_type()
116 static std::unique_ptr<Expression> get_value(const Context& context, int line, in get_value()
119 return caps->value(context); in get_value()
122 context.fErrors->error(line, "unknown capability flag '" + name + "'"); in get_value()
126 std::unique_ptr<Expression> Setting::Convert(const Context& context, int line, in Convert()
130 if (context.fConfig->fSettings.fReplaceSettings) { in Convert()
137 return type ? std::make_unique<Setting>(line, name, type) : nullptr; in Convert()