r?jrmuizel - Only check robustness if it's supported.
draft
r?jrmuizel - Only check robustness if it's supported.
From 15596597a92b139c93fa319433f72d1d3349ee4a Mon Sep 17 00:00:00 2001
---
gfx/gl/GLContext.cpp | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
MozReview-Commit-ID: A1azNo7Ioy3
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1085,40 +1085,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 } },