Closed Bug 2053067 Opened 2 months ago Closed 1 month ago

Hook up blocklist and prefs for WebGL on Metal ANGLE

Categories

(Core :: Graphics: CanvasWebGL, task)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxpe])

Attachments

(1 file)

We want this blocked and disabled by default because this isn't usable yet

It would be tempting to reuse the existing blocklist feature
WEBGL_ANGLE, but this is unfortunately named. On Windows it actually
indicates whether WebGL is allowed to use a hardware accelerated D3D
ANGLE context. If blocked, ANGLE may still be used with a WARP device.

To avoid confusion, we instead add a new blocklist feature:
WEBGL_ANGLE_METAL. This is currently always blocked, as we are not
yet building or shipping ANGLE libraries on macOS. We also
specifically block it on devices with multiple GPUs or macOS versions
earlier than 12, as support for these will likely follow the initial
rollout and we don't want to accidentally enable for these systems
prematurely.

The existing pref webgl.disable-angle can be used to disable the
feature even when the blocklist allows it. We now set this to true
(i.e. ANGLE is disabled) by default on non-Windows.

A gfxVar is initialized from the blocklist state, and this is used in
combination with the pref to decide whether to create an ANGLE (EGL)
or native (CGL) context for WebGL. We additionally always choose
native when the FORBID_HARDWARE flag is set, as Metal does not
expose a software renderer.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Whiteboard: [fxpe]
Pushed by rperta@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0c02f311bd62 https://hg.mozilla.org/mozilla-central/rev/9ab262a2e5cd Hook up blocklist and prefs for using Metal ANGLE for WebGL on macOS. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: