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 199069 22d65607166fa67f5ccb1c4e27cc8e51763a5bcd
parent 199068 0e571cde7fecfdbf7c77795fd0ee104723ce8cad
child 199070 003162dc4e12ebd5c1b567404b558e0b5d4b729a
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel, sledru
bugs999445
milestone31.0a2
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 (IsGLES()) {
             SymLoadStruct symbols_ES2[] = {
                 { (PRFuncPtr*) &mSymbols.fGetShaderPrecisionFormat, { "GetShaderPrecisionFormat", nullptr } },
                 { (PRFuncPtr*) &mSymbols.fClearDepthf, { "ClearDepthf", nullptr } },