Bug 1199923 - Work around Intel Linux driver lying about max texture size. r=jgilbert, a=ritu
authorEdwin Flores <eflores@mozilla.com>
Wed, 13 Jan 2016 11:28:05 +0000
changeset 310812 3932a740011c0de05e95ad7da46cf2c3881516ad
parent 310811 6252d26907b6133474714aabea3249922cc3a297
child 310813 41a8d4d5521f5960597fad5f6dd1614fdc6f8ae2
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, ritu
bugs1199923
milestone45.0a2
Bug 1199923 - Work around Intel Linux driver lying about max texture size. r=jgilbert, a=ritu
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1700,21 +1700,28 @@ GLContext::InitWithPrefix(const char *pr
                 }
 
                 // Part of the bug 879656, but it also doesn't hurt the 877949
                 mNeedsTextureSizeChecks = true;
             }
         }
 #endif
 #ifdef MOZ_X11
-        if (mWorkAroundDriverBugs &&
-            mVendor == GLVendor::Nouveau) {
-            // see bug 814716. Clamp MaxCubeMapTextureSize at 2K for Nouveau.
-            mMaxCubeMapTextureSize = std::min(mMaxCubeMapTextureSize, 2048);
-            mNeedsTextureSizeChecks = true;
+        if (mWorkAroundDriverBugs) {
+            if (mVendor == GLVendor::Nouveau) {
+                // see bug 814716. Clamp MaxCubeMapTextureSize at 2K for Nouveau.
+                mMaxCubeMapTextureSize = std::min(mMaxCubeMapTextureSize, 2048);
+                mNeedsTextureSizeChecks = true;
+            } else if (mVendor == GLVendor::Intel) {
+                // Bug 1199923. Driver seems to report a larger max size than
+                // actually supported.
+                mMaxTextureSize /= 2;
+                mMaxRenderbufferSize /= 2;
+                mNeedsTextureSizeChecks = true;
+            }
         }
 #endif
         if (mWorkAroundDriverBugs &&
             Renderer() == GLRenderer::AdrenoTM420) {
             // see bug 1194923. Calling glFlush before glDeleteFramebuffers
             // prevents occasional driver crash.
             mNeedsFlushBeforeDeleteFB = true;
         }