Closed Bug 1663152 Opened 4 years ago Closed 4 years ago

MOZ_X11_EGL/proprietary Nvidia: WebGL 2 is not available: "WebGL 2 requires support for the following features: get_integer64_indexed"

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
84 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- unaffected
firefox81 --- unaffected
firefox82 --- wontfix
firefox83 --- wontfix
firefox84 --- verified

People

(Reporter: jan, Assigned: jgilbert)

References

Details

(Keywords: nightly-community)

Attachments

(3 files)

Attached file aboutsupport.txt

Gnome X11, Debian Testing, Nvidia GTX 1060, driver 450.57

Since bug 1650583 it's possible to use MOZ_X11_EGL=1 with proprietary Nvidia on Linux.

MOZ_X11_EGL=1 mozregression --launch 20200903151816 --pref gfx.webrender.all:true widget.dmabuf-webgl.enabled:false -a about:support -a http://webglsamples.org/WebGL2Samples/#draw_image_space

about:support:

WebGL 2 Driver Renderer: WebGL creation failed:

  • WebGL 2 requires support for the following features:
    get_integer64_indexed

It works with GLX.

We can't use EGL with proprietary NVIDIA drivers.

No longer blocks: linux-egl

(In reply to Martin Stránský [:stransky] from comment #1)

We can't use EGL with proprietary NVIDIA drivers.

Thanks, I'm just curious, could you elaborate on this or provide a link to a discussion. I searched over the #788319, but haven't found anything about that.

(In reply to Martin Stránský [:stransky] from comment #1)

We can't use EGL with proprietary NVIDIA drivers.

(Martin Stránský [:stransky] from bug 1650583comment #22)

When GLX Vsync source is created along EGL contexts, NVIDIA drivers refuse to make any EGL content current.
So disable GLX Vsync source creation when EGL context is used.

Just plugged my GTX1060 back onto the mainboard: It's much less bad than feared.
As GLX is apparently only used for Visual (bug 1663003 comment 17), but not for vsync, nothing is broken.
MOZ_X11_EGL=1 still works, there are no black borders. There is just this one WebGL2 problem.
Even EGL_KHR_swap_buffers_with_damage works! Nice! (Debian Testing, Gnome X11 on proprietary Nvidia driver 450.66)

I don't know why it's only a problem on EGL/proprietary Nvidia, but I've found the cause:

https://searchfox.org/mozilla-central/rev/1a973762afcbc5066f73f1508b0c846872fe3952/gfx/gl/GLContextFeatures.cpp#185

{"get_integer64_indexed",
GLVersion::GL3_2,
GLESVersion::ES3,
GLContext::Extension_None,
{GLContext::Extensions_End}},

This bug can be fixed by requiring OpenGL 3.2 instead of 3.1 on EGL in this line.
GLX already requires OpenGL 3.2.

Attached about:support (MOZ_X11_EGL=1 ./mach run) shows working WebGL2 on EGL/X11/Proprietary Nvidia.
Would it be okay to make this change? Shall I submit this one line patch via Phabricator or would you expect problems for other targets (should it be gated by MOZ_WIDGET_GTK)?

Background info: I don't know if it's related, but since bug 1474281 OGL is preferred over GLES when using EGL.

(Benefit: Proprietary Nvidia supports EGL_KHR_swap_buffers_with_damage (bug 1648799) when using MOZ_X11_EGL=1.)

Flags: needinfo?(jgilbert)

Weird, we expect the driver to give us 3.2 when we request 3.1, if 3.2 is supported! I suppose this might be due to the awkward two-stage compat/core profile introduction that added compat in 3.1, but only added core profiles in 3.2.
I think we should just ask for 3.2 instead of 3.1 here.
Good investigation!

Flags: needinfo?(jgilbert)
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Severity: -- → S4
Priority: -- → P3
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/016992fe00d7 Ask for 3.2core+ if !REQUIRE_COMPAT_PROFILE on EGL. r=lsalzman
Flags: needinfo?(jgilbert)

TEST-UNEXPECTED-FAIL | browser/base/content/test/performance/browser_startup_mainthreadio.js | unexpected stat on C:\Users\task_1602223743\AppData\Local\Mozilla\firefox before first paint -

This so far unexpected action only occured on "Windows 10 x64 WebRender opt".

2 months ago, there were similar previously unexpected actions and they have been allowed:

(Joel Maher ( :jmaher ) (UTC -0400) from bug 1658443 comment 0)

I am working to get our windows10 tests running on hardware (and fallback to the cloud when busy) in order to use our spare cpu time in the datacenter. most tests pass juts fine, but a few fail.

I can add exceptions to the files, is there more work that needs to be done before doing that?

(Joel Maher ( :jmaher ) (UTC -0400) from bug 1660582 comment 0)

in bug 1658443 I reported a set of file/IO access while running tests on windows10 hardware instead of VMs at AWS.

TEST-UNEXPECTED-FAIL | browser/base/content/test/performance/browser_startup_mainthreadio.js | unexpected stat on C:\Users\task_1596845536\AppData\Local\Temp\tmpudqlbh.mozrunner\wmfvpxvideo.guard before handling user events -

See Also: → 1658443
Flags: needinfo?(jgilbert)
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e77b411162c3 Ask for 3.2core+ if !REQUIRE_COMPAT_PROFILE on EGL. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: