[Linux] Enable WebGL DMABuf backend for X11/EGL
Categories
(Core :: Graphics, enhancement)
Tracking
()
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Crash Data
Attachments
(3 files)
Enable WebGL DMABuf backend for X11/EGL.
Assignee | ||
Comment 1•3 years ago
|
||
This is basically Bug 1586696 but for X11.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D84900
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Awesome! Will have a deeper look tomorrow, but on a first glance it looks great!
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0ab1cd36a2dbf0aa10cf263cf806c1a35c0d05c9
Comment 5•3 years ago
|
||
Gnome Wayland, Debian Testing, Intel HD Graphics 630 (KBL GT2), 2560x1440 (one APU, no external GPUs)
$ MOZ_X11_EGL=1 mozregression --repo try --launch 0ab1cd36a2dbf0aa10cf263cf806c1a35c0d05c9 --pref gfx.webrender.all:true layers.gpu-process.enabled:false -a https://webglsamples.org/aquarium/aquarium.html
By performance, it definitely works.
500 fish: ~58 fps (~34 without DMABUF) on a 60 Hz display. After a minute, tab becomes black or crashes.
1000 fish: ~50 fps (31 without)
5000 fish: 26 fps (18 without)
10000 fish: 14 fps (12 without)
$ MOZ_X11_EGL=1 mozregression --repo try --launch 0ab1cd36a2dbf0aa10cf263cf806c1a35c0d05c9 --pref gfx.webrender.all:true layers.gpu-process.enabled:false -a https://webglsamples.org/aquarium/aquarium.html -B debug
It took longer to repro with a debug build. Quotes from attached log:
0:43.12 INFO: b'[Child 8009, Main Thread] WARNING: Failed to create EGLContext with rbab_attribs: file /builds/worker/checkouts/gecko/gfx/gl/GLContextProviderEGL.cpp, line 713'
0:43.12 INFO: b'[Child 8009, Main Thread] WARNING: Failed to create EGLContext with robustness_attribs: file /builds/worker/checkouts/gecko/gfx/gl/GLContextProviderEGL.cpp, line 719'
0:43.12 INFO: b'Initializing context 0x7f30388a6820 surface 0x7f303e1ab800 on display 0x7f303e1a8000'
0:43.12 INFO: b'[Child 8009, Main Thread] WARNING: robust_buffer_access_behavior marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp, line 623'
0:43.12 INFO: b'[Child 8009, Main Thread] WARNING: Robustness supported, strategy is not LOSE_CONTEXT_ON_RESET!: file /builds/worker/checkouts/gecko/gfx/gl/GLContext.cpp, line 959'
0:43.12 INFO: b'[Child 8009, Main Thread] WARNING: robustness marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp, line 623'
0:43.36 INFO: b'[GFX2-]: glXWaitVideoSync failed to increment the sync counter.'
This seems to be the moment it became black:
7:56.13 INFO: b'[Child 8009, Main Thread] WARNING: Failed to duplicate file handle for other process!: file /builds/worker/checkouts/gecko/ipc/glue/FileDescriptor.cpp, line 79'
7:56.13 INFO: b'IPDL protocol Error: Received an invalid file descriptor'
[...]
7:57.14 INFO: b'[Parent 7774, Renderer] WARNING: EGLImageKHR creation failed: file /builds/worker/checkouts/gecko/widget/gtk/DMABufSurface.cpp, line 544'
7:57.14 INFO: b'[2020-07-25T13:02:23Z WARN webrender::renderer] Invalid ext-image'
7:57.21 INFO: b'[Child 8009, Main Thread] WARNING: Failed to duplicate file handle for current process!: file /builds/worker/checkouts/gecko/ipc/glue/FileDescriptor.cpp, line 124'
7:57.21 INFO: b'IPDL protocol Error: Received an invalid file descriptor'
7:57.21 INFO: b'IPDL protocol Error: Received an invalid file descriptor'
7:57.21 INFO: b'[Parent 7774, Renderer] WARNING: EGLImageKHR creation failed: file /builds/worker/checkouts/gecko/widget/gtk/DMABufSurface.cpp, line 544'
7:57.21 INFO: b'[2020-07-25T13:02:23Z WARN webrender::renderer] Invalid ext-image'
Comment 6•3 years ago
|
||
(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #5)
...
After a minute, tab becomes black or crashes.
...
Interesting. I can't reproduce that here - did you check already if it only happens with the EGL backend or also on Wayland, with the same build?
Pushed by abutkovits@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ffcc87593328 [Linux] Move dmabuf format setup from nsWaylandDisplay to nsDMABufDevice, r=rmader
Comment 8•3 years ago
|
||
(In reply to Robert Mader [:rmader] from comment #6)
Interesting. I can't reproduce that here - did you check already if it only happens with the EGL backend or also on Wayland, with the same build?
Yes, reproducible for me with MOZ_X11_EGL=1 and MOZ_ENABLE_WAYLAND=1: bug 1655323
It would still be good to enable DMABUF WebGL for users of experimental MOZ_X11_EGL=1 env var.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Pushed by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e401631f3ef [Linux] Enable WebGL DMABuf backend for X11/EGL, r=jgilbert
Comment 12•3 years ago
|
||
bugherder |
Assignee | ||
Comment 13•3 years ago
|
||
Should be fixed now.
Updated•3 years ago
|
Description
•