[Wayland] Implement Wayland DMABuf texture backend for WebRender
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 3 open bugs)
Details
Attachments
(3 files, 1 obsolete file)
We need to extent Wayland DMABuf texture backend (Bug 1578380) for WebRenderer.
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
WIP patch, I'm getting this error with it:
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed to compile shader: brush_image
0:1236(27): error: no matching function for call to `textureSize(samplerExternalOES, int)'; candidates are:
0:1236(27): error: int textureSize(sampler1D, int)
0:1236(27): error: int textureSize(isampler1D, int)
0:1236(27): error: int textureSize(usampler1D, int)
....
so it needs more work on the GL side.
| Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #1)
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed to compile shader: brush_image
0:1236(27): error: no matching function for call to `textureSize(samplerExternalOES, int)'; candidates are:
0:1236(27): error: int textureSize(sampler1D, int)
0:1236(27): error: int textureSize(isampler1D, int)
0:1236(27): error: int textureSize(usampler1D, int)
I wonde why I get this bug, as GL_OES_EGL_image_external_essl3 is supported on my system and the shader is compiled with
#version 300 es
which is GLES 3.0 which is supposed to support samplerExternalOES.
| Assignee | ||
Comment 3•6 years ago
|
||
I see it's https://github.com/servo/webrender/issues/3310
(I added #extension OES_EGL_image_external_essl3 : enable) to shader).
| Assignee | ||
Comment 4•6 years ago
|
||
Hm, looks like I do something wrong here. ES3 should be enabled on WebRender, OES_EGL_image_external_essl3 is supported.
When I hardcode:
#define WR_FEATURE_TEXTURE_EXTERNAL 1
to the shader I get:
Hit MOZ_CRASH(Caught GL error 502 at tex_sub_image_3d_pbo) at gfx/wr/webrender/src/device/gl.rs:1253
which does not look correct.
| Assignee | ||
Comment 5•6 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #2)
(In reply to Martin Stránský [:stransky] from comment #1)
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: Failed to compile shader: brush_image
0:1236(27): error: no matching function for call to `textureSize(samplerExternalOES, int)'; candidates are:
0:1236(27): error: int textureSize(sampler1D, int)
0:1236(27): error: int textureSize(isampler1D, int)
0:1236(27): error: int textureSize(usampler1D, int)
Filed as https://gitlab.freedesktop.org/mesa/mesa/issues/1901
Comment 6•6 years ago
|
||
| Assignee | ||
Comment 7•6 years ago
|
||
Thanks for testing! It should be enough to set widget.wayland_dmabuf_backend.enabled to true at about:config.
| Assignee | ||
Comment 8•6 years ago
|
||
Btw. Did that DMABUF init failed with "Failed to create obtain pixel format, DMABUF/DRM won't be available!" ?
| Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #5)
Filed as https://gitlab.freedesktop.org/mesa/mesa/issues/1901
Mesa is fix is on the way so we can proceed here.
| Assignee | ||
Comment 10•6 years ago
|
||
| Assignee | ||
Comment 11•6 years ago
|
||
Depends on D49263
| Assignee | ||
Comment 12•6 years ago
|
||
Depends on D49264
| Assignee | ||
Comment 13•6 years ago
|
||
To get it working you also need mesa with a patch from https://gitlab.freedesktop.org/mesa/mesa/issues/1901
Comment 14•6 years ago
|
||
(In reply to Martin Stránský [:stransky] from comment #8)
Btw. Did that DMABUF init failed with "Failed to create obtain pixel format, DMABUF/DRM won't be available!" ?
On Ubuntu 18.04, dmabuf_modifiers() was not called. It seemed to make nsWaylandDisplay::GetGbmFormat() failure.
| Assignee | ||
Comment 15•6 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #14)
On Ubuntu 18.04, dmabuf_modifiers() was not called. It seemed to make nsWaylandDisplay::GetGbmFormat() failure.
Yes, that means your Wayland compositor does not support zwp_linux_dmabuf_v1 version 3. It should be at mutter-3.25.90 [1] but I'm not entirely sure the which version. I have mutter-3.32.2 (Fedora 30).
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/927679118b14
[Wayland] Assert when EGLImage is already created at WaylandDMABufSurface::CreateEGLImage, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/10315b0f4304
[Wayland] Implement RenderWaylandDMABUFTextureHostOGL based on WaylandDMABUFSurface, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/1dfc280e1f0e
[Wayland] Use WebRender WaylandDMABufSurface backend when dmabuf is enabled, r=sotaro
Comment 17•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/927679118b14
https://hg.mozilla.org/mozilla-central/rev/10315b0f4304
https://hg.mozilla.org/mozilla-central/rev/1dfc280e1f0e
Description
•