Blacklist WebGL on some cards on Mac, like Chrome does

RESOLVED FIXED

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bjacob, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

See for example this crash:

https://crash-stats.mozilla.com/report/index/1bdd501b-cf53-4815-8aa8-bcae42110707

It's on a Geforce 7300 GT. Chrome already blacklists this card and now it seems we have to do the same. Here's their blacklist:

http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/software_rendering_list.json

We need to borrow the no-WebGL-on-certain-cards-on-Mac rules.

Now the problem is that our current Mac blacklist is based on CGL Renderer IDs which only give a very rough approximation of what the GPU is. For example it doesn't allow to distinguish between Geforce FX, 6 and 7, let alone distinguish models within these Geforce series.

So what we need is to figure if there's a way to get precise device identification without creating a OpenGL context: does CGL allow that?

If not, as a last ditch solution, we can do the check post-GL-context-creation, by using glGetString(GL_RENDERER). Then that would no longer be done in GfxInfo, instead that would go in GLContext initialization. But really try hard to avoid that. For speed and safety reasons it's better to implement the blacklisting before GL context creation.
(Reporter)

Comment 1

6 years ago
One thing that we can do easily is block WebGL on all the kCGLRendererGeForceFXID family on Macs. This seems to include all Geforce FX/6/7 series. At least the crash link above was with this ID (see the Renderers: 0x22400 and the above CGL documentation page). So this would fix this crash, at the expense of disabling WebGL on more macs than necessary. Then again, Geforce 7 cards are old, and I don't know if it's a big deal to disable WebGL on Macs with old cards especially as we disable it on Mac OS 10.5 already. So, if this crash is a big deal (I have no idea) we can just do that.
(Reporter)

Comment 2

6 years ago
Mo: I'd be interested to know how you detect precise devices on Mac? Does CGL allow that?

Comment 3

6 years ago
We use IOKit to scan for PCI-based GPUs.

See http://src.chromium.org/viewvc/chrome/trunk/src/content/gpu/gpu_info_collector_mac.mm?view=markup
(Reporter)

Comment 4

6 years ago
Ah! Thanks for the tip.
(Reporter)

Updated

6 years ago
Depends on: 678330
(Reporter)

Comment 5

6 years ago
Filed bug 678330 about implementing the right IOKit-based solution like Chrome.

Meanwhile let's do as explained in comment 1 to be safe for now. It will only affect people who have 5+ years old hardware with Mac OS 10.6, which shouldn't be too many people anyways.
(Reporter)

Comment 6

6 years ago
Created attachment 552480 [details] [diff] [review]
blacklist geforce <= 7 for WebGL on Mac

Notice we were already blacklisting them for GL layers, as we couldn' distinguish the FX from the 6/7 series and the FX used software fallbacks. We've been needing bug 678330 for a long time.
(Reporter)

Updated

6 years ago
Attachment #552480 - Flags: review?(jmuizelaar)
Attachment #552480 - Flags: review?(jmuizelaar) → review+
(Reporter)

Comment 7

6 years ago
http://hg.mozilla.org/mozilla-central/rev/cffe69e9357e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.