Bug 999445 - Do not fail GLContext initialization if the GL_VERSION is too low. We may get what we need as extensions. - r=jrmuizel, a=sledru
authorBenoit Jacob <bjacob@mozilla.com>
Mon, 05 May 2014 15:40:51 -0400
changeset 192206 f15b4b99adc4
parent 192201 5958a9259d6a
child 192207 0a9afc76690c
push id3523
push userbjacob@mozilla.com
push date2014-05-06 13:38 +0000
treeherdermozilla-beta@f15b4b99adc4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, sledru
bugs999445
milestone30.0
Bug 999445 - Do not fail GLContext initialization if the GL_VERSION is too low. We may get what we need as extensions. - r=jrmuizel, a=sledru
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -460,30 +460,30 @@ GLContext::InitWithPrefix(const char *pr
 
     };
 
     mInitialized = LoadSymbols(&symbols[0], trygl, prefix);
     MakeCurrent();
     if (mInitialized) {
         unsigned int version = 0;
 
-        bool parseSuccess = ParseGLVersion(this, &version);
+        ParseGLVersion(this, &version);
 
 #ifdef DEBUG
         printf_stderr("OpenGL version detected: %u\n", version);
         printf_stderr("OpenGL vendor: %s\n", fGetString(LOCAL_GL_VENDOR));
         printf_stderr("OpenGL renderer: %s\n", fGetString(LOCAL_GL_RENDERER));
 #endif
 
         if (version >= mVersion) {
             mVersion = version;
-        } else if (parseSuccess) {
-            NS_WARNING("Parsed version less than expected.");
-            mInitialized = false;
         }
+        // Don't fail if version < mVersion, see bug 999445,
+        // Mac OSX 10.6/10.7 machines with Intel GPUs claim only OpenGL 1.4 but
+        // have all the GL2+ extensions that we need.
     }
 
     // Load OpenGL ES 2.0 symbols, or desktop if we aren't using ES 2.
     if (mInitialized) {
         if (IsGLES2()) {
             SymLoadStruct symbols_ES2[] = {
                 { (PRFuncPtr*) &mSymbols.fGetShaderPrecisionFormat, { "GetShaderPrecisionFormat", nullptr } },
                 { (PRFuncPtr*) &mSymbols.fClearDepthf, { "ClearDepthf", nullptr } },