Bug 1339256 - Don't assert on unrecognized context reset strategy - r=daoshengmu
MozReview-Commit-ID: CITo6W0FLQS
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1148,18 +1148,23 @@ GLContext::LoadMoreSymbols(const char* p
const bool useCore = this->IsFeatureProvidedByCoreSymbols(feature);
const auto list = useCore ? coreList : extList;
return fnLoadForFeature(list, feature);
};
if (IsSupported(GLFeature::robustness)) {
const auto resetStrategy = GetIntAs<GLuint>(LOCAL_GL_RESET_NOTIFICATION_STRATEGY);
if (resetStrategy != LOCAL_GL_LOSE_CONTEXT_ON_RESET) {
- MOZ_ASSERT(resetStrategy == LOCAL_GL_NO_RESET_NOTIFICATION);
- NS_WARNING("Robustness supported, but not active!");
+ NS_WARNING("Robustness supported, strategy is not LOSE_CONTEXT_ON_RESET!");
+ if (ShouldSpew()) {
+ const bool isDisabled = (resetStrategy == LOCAL_GL_NO_RESET_NOTIFICATION);
+ printf_stderr("Strategy: %s (0x%04x)",
+ (isDisabled ? "disabled" : "unrecognized"),
+ resetStrategy);
+ }
MarkUnsupported(GLFeature::robustness);
}
}
if (IsSupported(GLFeature::robustness)) {
const SymLoadStruct symbols[] = {
{ (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatus",
"GetGraphicsResetStatusARB",
"GetGraphicsResetStatusKHR",