diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/ExtensionBehavior.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/ExtensionBehavior.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/ExtensionBehavior.h b/src/3rdparty/angle/src/compiler/translator/ExtensionBehavior.h index cf4d7fba31..782c1c9217 100644 --- a/src/3rdparty/angle/src/compiler/translator/ExtensionBehavior.h +++ b/src/3rdparty/angle/src/compiler/translator/ExtensionBehavior.h @@ -34,4 +34,10 @@ inline const char* getBehaviorString(TBehavior b) // Mapping between extension name and behavior. typedef std::map<std::string, TBehavior> TExtensionBehavior; +inline bool IsExtensionEnabled(const TExtensionBehavior &extBehavior, const char *extension) +{ + auto iter = extBehavior.find(extension); + return iter != extBehavior.end() && (iter->second == EBhEnable || iter->second == EBhRequire); +} + #endif // COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_ |