Closed Bug 1620075 Opened 4 years ago Closed 3 years ago

Allow ANGLE to run ES3 on D3D feature level 10.0 hardware

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

ANGLE currently requires 10.1 but we don't need any of the features that require 10.1. It should be possible to force ANGLE to run on 10.0 hardware

Blocks: 1441827
Priority: -- → P3
Attached patch Force it to workSplinter Review
Assignee: nobody → jmuizelaar

I tried out this patch and it seemed to work fine. However, we can't land it as is because it would expose WebGL2 on devices where ANGLE doesn't really support ES3.

Some options:

  1. Maintain this in our copy and detect 10_0 devices and avoid exposing WebGL2 on them.
  2. Add something to ANGLE that lets us opt-in to ES3 on 10_0 devices.
  3. Something else?

Jeff do you have any thoughts on how to proceed?

Flags: needinfo?(jgilbert)

We should explicitly hand ANGLE a d3d11 device with EGL_ANGLE_device_creation_d3d111 and add a way to force it to accept/handle FL 10_0 devices.

Flags: needinfo?(jgilbert)

Try Push of Comment 1

I have tried this on my DirectX 10.0 Device (see about:support) and it feels anecdotally equivalent in performance compared to Advanced Layers, except for video playback performance which is significantly slower compared to Advanced Layers. DirectComposition and WEBRENDER_PARTIAL seem to be working as well.

I had to manually enable WR so I guess an update of the blocklist/allowlist will also be required?

New try push

I tested this again with the direct composition work for video playback mostly finished, and this has greatly improved performance, even for worst case scenarios like 720p60 videos on this device, e.g. https://www.youtube.com/watch?v=rql_F8H3h9E that includes constant large movements between the frames. The device has a 1280x800 display and a NVIDIA GeForce 8600M GS.

Using "Stats for nerds" on YouTube on https://www.youtube.com/watch?v=rql_F8H3h9E with h264ify to force h264, I measured:

  • between 27/7508 and 143/7487 droppped frames using the try push above over several runs
  • 132/7497 on 2020-10-28 Nightly with Advanced Layers
  • 49/7488 dropped frames on 82.0.2 Advanced layers

Setting gfx.webrender.dcomp-video-overlay-win to true yielded 85/7543 dropped frames but this might just be margin of error improvements and might require more measurements.

For reference the commit to disable ES3 on 10.0 hardware was: https://chromium.googlesource.com/angle/angle/+/34106e7a26.

The reason had to do with multisampling shaders which isn't something we need.

I agree, we can probably just pass an FL10_0 device directly, possibly without any angle changes needed.

GetPlatformDisplay takes a list of EGLAttrib instead of EGLInt. This is needed
if we want to pass EGL_FEATURE_OVERRIDES_ENABLED_ANGLE.

We set the feature flag when creating the EGL display. This lets us run
WebRender on devices that only support D3D 10.0

Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c843f2ab2d12
Update update-angle.py to emit black-compatible moz.builds. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/ac20c858514d
[angle/firefox-84] Allow ANGLE to run ES3 on D3D feature level 10.0 hardware. r=jrmuizel
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f1b1b1e0959b
Fix lint failure on a CLOSED TREE. a=lint-fix
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/881578b6760d
Use GetPlatformDisplay instead of GetPlatformDisplayEXT. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/a436ebd267fe
Add a feature flag to allow ES3 on 10.0 devices.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: