Bug 1367570 - Explicitly set vertex attribs [1,3] to opaque black - r=jgilbert
authorSamuel Vargas <savarga1@asu.edu>
Wed, 24 May 2017 14:28:21 +0000
changeset 409085 6c2e66552c700573e7f2f4de0af9e33532114fe6
parent 409084 9299b94487189323212d76ca5cd231be51566287
child 409086 ebad93e117700d8e2d65573b824beb18a8cc2030
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1367570
milestone55.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 1367570 - Explicitly set vertex attribs [1,3] to opaque black - r=jgilbert
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -896,16 +896,23 @@ GLContext::InitWithPrefixImpl(const char
             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;
         }
+        // Bug 1367570. Explicitly set vertex attributes [1,3] to opaque
+        // black because Nvidia doesn't do it for us.
+        if (mVendor == GLVendor::NVIDIA) {
+            for (size_t i = 1; i <= 3; ++i) {
+                mSymbols.fVertexAttrib4f(i, 0, 0, 0, 1);
+            }
+        }
     }
 #endif
     if (mWorkAroundDriverBugs &&
         Renderer() == GLRenderer::AdrenoTM420) {
         // see bug 1194923. Calling glFlush before glDeleteFramebuffers
         // prevents occasional driver crash.
         mNeedsFlushBeforeDeleteFB = true;
     }