Bug 1545473 - Use FakeVertexAttrib0 for no-attrib programs on macOS. r=lsalzman
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 27 Jun 2019 01:52:47 +0000
changeset 480297 2dc839c3e6b329cea80f281b50da96a3d5bbc6d0
parent 480296 e57ef2080d3fe256ed188285f178ab97729af28d
child 480298 4b8d5a6d5143de720aa345ad8162c1f0ac3dad09
push id88607
push userjgilbert@mozilla.com
push dateThu, 27 Jun 2019 03:56:31 +0000
treeherderautoland@2dc839c3e6b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1545473
milestone69.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 1545473 - Use FakeVertexAttrib0 for no-attrib programs on macOS. r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D36122
dom/canvas/WebGLContextDraw.cpp
--- a/dom/canvas/WebGLContextDraw.cpp
+++ b/dom/canvas/WebGLContextDraw.cpp
@@ -835,16 +835,20 @@ WebGLVertexAttrib0Status WebGLContext::W
   MOZ_ASSERT(mActiveProgramLinkInfo);
 
   bool legacyAttrib0 = gl->IsCompatibilityProfile();
 #ifdef XP_MACOSX
   if (gl->WorkAroundDriverBugs()) {
     // Failures in conformance/attribs/gl-disabled-vertex-attrib.
     // Even in Core profiles on NV. Sigh.
     legacyAttrib0 |= (gl->Vendor() == gl::GLVendor::NVIDIA);
+
+    // Also programs with no attribs:
+    // conformance/attribs/gl-vertex-attrib-unconsumed-out-of-bounds.html
+    legacyAttrib0 |= !mActiveProgramLinkInfo->attribs.size();
   }
 #endif
 
   if (!legacyAttrib0) return WebGLVertexAttrib0Status::Default;
 
   if (!mActiveProgramLinkInfo->attrib0Active) {
     // Ensure that the legacy code has enough buffer.
     return WebGLVertexAttrib0Status::EmulatedUninitializedArray;