Bug 778765 - Work around nouveau driver bug by changing samples=1 to samples=0 - r=jgilbert
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 03 Aug 2012 11:08:11 -0400
changeset 101306 0d1da7c6afd56abc1dbd9a2dcf393f9be944fc8a
parent 101305 470c2ac0548a9acc2f60a2d8f99a6fbbe73ea757
child 101307 33d2a320f683739be5b21ac68230272755b69bf7
push id12951
push userbjacob@mozilla.com
push dateFri, 03 Aug 2012 15:08:21 +0000
treeherdermozilla-inbound@0d1da7c6afd5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs778765
milestone17.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 778765 - Work around nouveau driver bug by changing samples=1 to samples=0 - r=jgilbert
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1328,16 +1328,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);