Bug 1267879 - Only check robustness if it's supported. - r=jrmuizel
MozReview-Commit-ID: 4RNjnWFccID
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1111,40 +1111,42 @@ GLContext::LoadMoreSymbols(const char* p
const SymLoadStruct* extList,
GLFeature feature)
{
const bool useCore = this->IsFeatureProvidedByCoreSymbols(feature);
const auto list = useCore ? coreList : extList;
return fnLoadForFeature(list, feature);
};
- bool hasRobustness = false;
- if (SupportsRobustness()) {
+ if (IsSupported(GLFeature::robustness)) {
+ bool hasRobustness = true;
+
if (IsExtensionSupported(ARB_robustness)) {
const SymLoadStruct symbols[] = {
{ (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusARB", nullptr } },
END_SYMBOLS
};
- if (fnLoadForExt(symbols, ARB_robustness)) {
- hasRobustness = true;
+ if (!fnLoadForExt(symbols, ARB_robustness)) {
+ hasRobustness = false;
}
}
if (!hasRobustness && IsExtensionSupported(EXT_robustness)) {
const SymLoadStruct symbols[] = {
{ (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusEXT", nullptr } },
END_SYMBOLS
};
- if (fnLoadForExt(symbols, EXT_robustness)) {
- hasRobustness = true;
+ if (!fnLoadForExt(symbols, EXT_robustness)) {
+ hasRobustness = false;
}
}
- }
- if (!hasRobustness) {
- MarkUnsupported(GLFeature::robustness);
+
+ if (!hasRobustness) {
+ MarkUnsupported(GLFeature::robustness);
+ }
}
if (IsSupported(GLFeature::sync)) {
const SymLoadStruct symbols[] = {
{ (PRFuncPtr*) &mSymbols.fFenceSync, { "FenceSync", nullptr } },
{ (PRFuncPtr*) &mSymbols.fIsSync, { "IsSync", nullptr } },
{ (PRFuncPtr*) &mSymbols.fDeleteSync, { "DeleteSync", nullptr } },
{ (PRFuncPtr*) &mSymbols.fClientWaitSync, { "ClientWaitSync", nullptr } },