-99.8% performance regression in Firefox Nightly in In Limbo WebGL 2 demo on August 3rd (in emunittests suite)

RESOLVED FIXED in Firefox 51



3 years ago
3 years ago


(Reporter: jujjyl, Assigned: jgilbert)



Dependency tree / graph

Firefox Tracking Flags

(firefox50 disabled, firefox51 fixed, firefox52 fixed, firefox53 fixed)


(Whiteboard: [gfx-noted])


(2 attachments)

After August 3rd on my Mac Pro workstation with

OS X El Capitan 10.11.6
Mac Pro (Late 2013)
3.5 GHz 6-core Intel Xeon E5
AMD FirePro D500 3072MB

the In Limbo WebGL 2 demo has regressed from running at 30fps to taking about 20 seconds to render a single frame.

Bisecting mozilla-central gives the following range:


and bisecting manually further on gecko-dev on github points to the following commit that introduces the regression:

9125182b214272cda9e2737bbecb67cfe922771a is the first bad commit
commit 9125182b214272cda9e2737bbecb67cfe922771a
Author: Jeff Gilbert <jgilbert@mozilla.com>
Date:   Tue Jul 26 20:05:45 2016 -0700

    Bug 1289655 - Add primitive restart for WebGL 2. - r=mtseng
    MozReview-Commit-ID: 6SfI8yfROGI
Depends on: 1289655
Wow, can you profile this and see if anything sticks out?

My only guess is that primitive restart has terrible support on your system, and we should blacklist it.
Keywords: perf
Priority: -- → P4
Whiteboard: [gfx-noted]
See Also: → 1310219
Duplicate of this bug: 1318010
Performance hotspot via OS X profiler.
More info about this (discussed in face to face triaging with Jeff last week):
 - the demo does not use primitive restart, i.e. the performance impact occurs on all WebGL 2 content, independent of whether restarting is active.
 - based on the reported duplicate bug 1318010, can occur on both Intel and AMD GPUs on OS X.
 - profiling showed the hotspot to be in the OS X driver side and not directly in Firefox code (screenshot in above comment).
 - assumption is that primitive restart might not be efficient on some Mac GPUs, or that it is being activated in an expensive way, though this was not conclusive.
 - dire enough issue to be treated as a release blocker for WebGL 2.
 - last known good Firefox version before this regression can be downloaded from https://ftp.mozilla.org/pub/firefox/nightly/2016/08/2016-08-01-03-02-27-mozilla-central/ for easy triaging of other WebGL 2 performance issues that are suspected to be caused by this same root problem.
 - early known bad Firefox version a couple of days after this regression started can be downloaded from https://ftp.mozilla.org/pub/firefox/nightly/2016/08/2016-08-07-03-02-01-mozilla-central/ for triaging purposes.
Severity: normal → blocker
Priority: P4 → P1
Marking as P1 blocker for upcoming planned WebGL 2 release, since this practically will prevent WebGL 2 from working on OS X.
Assignee: nobody → jgilbert
With this patch, we seem to be at parity with Chrome Canary.
Comment on attachment 8819466 [details]
Bug 1309643 - Only enable primitive restart index on OSX for DrawElements. -

Attachment #8819466 - Flags: review?(ethlin) → review+
Comment on attachment 8819466 [details]
Bug 1309643 - Only enable primitive restart index on OSX for DrawElements. -

Approval Request Comment
[Feature/Bug causing the regression]: webgl2
[User impact if declined]:
[Is this code covered by automated tests?]:
[Has the fix been verified in Nightly?]:
[Needs manual test from QE? If yes, steps to reproduce]: 
[List of other uplifts needed for the feature/fix]:
[Is the change risky?]:
[Why is the change risky/not risky?]:
[String changes made/needed]:
Attachment #8819466 - Flags: approval-mozilla-beta?
Attachment #8819466 - Flags: approval-mozilla-aurora?
Pushed by jgilbert@mozilla.com:
Only enable primitive restart index on OSX for DrawElements. - r=ethlin
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment on attachment 8819466 [details]
Bug 1309643 - Only enable primitive restart index on OSX for DrawElements. -

Fix WebGL2 related issue. Beta51+ & Aurora52+. Should be in 51 beta 10.
Attachment #8819466 - Flags: approval-mozilla-beta?
Attachment #8819466 - Flags: approval-mozilla-beta+
Attachment #8819466 - Flags: approval-mozilla-aurora?
Attachment #8819466 - Flags: approval-mozilla-aurora+
Check-in: https://hg.mozilla.org/releases/mozilla-aurora/rev/617286d6483d - Jeff Gilbert - Bug 1309643 - Only enable primitive restart index on OSX for DrawElements. - r=ethlin. a=gchang
You need to log in before you can comment on or make changes to this bug.