Bug 778765 - Work around nouveau driver bug by changing samples=1 to samples=0 - r=jgilbert, a=lsblakk
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 03 Aug 2012 11:08:11 -0400
changeset 100477 3bb3b14f262a0f3559b922484b228b1f44141f26
parent 100476 375f160230b3683796e436a68093c27e14130a7c
child 100478 43237bc782d7a9453cfd0fe5319c9813fc12e5e8
push id1260
push userbjacob@mozilla.com
push dateFri, 10 Aug 2012 21:31:00 +0000
treeherdermozilla-beta@43237bc782d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, lsblakk
bugs778765
milestone15.0
Bug 778765 - Work around nouveau driver bug by changing samples=1 to samples=0 - r=jgilbert, a=lsblakk
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1303,16 +1303,21 @@ GLContext::ChooseGLFormats(ContextFormat
 
     GLsizei samples = aCF.samples;
 
     GLsizei maxSamples = 0;
     if (SupportsFramebufferMultisample())
         fGetIntegerv(LOCAL_GL_MAX_SAMPLES, (GLint*)&maxSamples);
     samples = NS_MIN(samples, maxSamples);
 
+    // bug 778765
+    if (WorkAroundDriverBugs() && samples == 1) {
+        samples = 0;
+    }
+
     formats.samples = samples;
     aCF.samples = samples;
 
 
     const int depth = aCF.depth;
     const int stencil = aCF.stencil;
     const bool useDepthStencil =
         !mIsGLES2 || IsExtensionSupported(OES_packed_depth_stencil);