Bug 879656 - Clamp the maximum texture size(s) on Nvidia Mac, even on 10.8+. r=jgilbert
authorMilan Sreckovic <milan@mozilla.com>
Tue, 09 Jul 2013 17:35:32 -0400
changeset 138402 c9c559b68ead9c263d9abd4041635d55a8d08209
parent 138401 4a12e7c6f7427aaac2d5127291b432192747da62
child 138403 69fa298ab6d26a37e0a49ed49afc812c9455a961
push id30956
push userryanvm@gmail.com
push dateFri, 12 Jul 2013 21:24:15 +0000
treeherdermozilla-inbound@c9c559b68ead [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs879656, 877949
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 879656 - Clamp the maximum texture size(s) on Nvidia Mac, even on 10.8+. r=jgilbert 8k too large, 8k-1 working. Same limit on the render buffer size. Note that <10.8 are already limited to 4k by the bug 877949.
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -633,19 +633,27 @@ GLContext::InitWithPrefix(const char *pr
                 mNeedsTextureSizeChecks = true;
             } else if (mVendor == VendorNVIDIA) {
                 SInt32 major, minor;
                 OSErr err1 = ::Gestalt(gestaltSystemVersionMajor, &major);
                 OSErr err2 = ::Gestalt(gestaltSystemVersionMinor, &minor);
 
                 if (err1 != noErr || err2 != noErr ||
                     major < 10 || (major == 10 && minor < 8)) {
+                    // See bug 877949.
                     mMaxTextureSize = std::min(mMaxTextureSize, 4096);
-                    mMaxRenderbufferSize   = std::min(mMaxRenderbufferSize, 4096);
+                    mMaxRenderbufferSize = std::min(mMaxRenderbufferSize, 4096);
                 }
+                else {
+                    // See bug 879656.  8192 fails, 8191 works.
+                    mMaxTextureSize = std::min(mMaxTextureSize, 8191);
+                    mMaxRenderbufferSize = std::min(mMaxRenderbufferSize, 8191);
+                }
+                // Part of the bug 879656, but it also doesn't hurt the 877949
+                mNeedsTextureSizeChecks = true;
             }
         }
 #endif
 #ifdef MOZ_X11
         if (mWorkAroundDriverBugs &&
             mVendor == VendorNouveau) {
             // see bug 814716. Clamp MaxCubeMapTextureSize at 2K for Nouveau.
             mMaxCubeMapTextureSize = std::min(mMaxCubeMapTextureSize, 2048);