Commit Graph

2389 Commits

Author SHA1 Message Date
sotaro
a807c798e9 Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers
The async front buffer posting is going to be enabled by another bug.

Async IPC was added for async front buffer posting for out-of-process WebGL.
Client does not use TextureClient for storing SurfaceDescriptor.
It works basically same way as to in-process WebGL around nsDisplayCanvas, WebRenderCanvasData, WebRenderCommandBuilder and WebRenderBridgeParent.
SharedSurfaces of SurfaceDescriptorD3D10 are kept alive during their usage. It is for keeping a shread handle valid.
Copied data buffers of SharedShurface_Basics are kept alive during their usage. It is for keeping RenderBufferTextureHost valid.

Differential Revision: https://phabricator.services.mozilla.com/D150197
2022-06-29 09:32:29 +00:00
Norisz Fay
f70f5a4b0f Backed out changeset af98fb4ff148 (bug 1712486) for causing build bustages on LayersSurfaces CLOSED TREE 2022-06-29 09:06:45 +03:00
sotaro
8a8d04cce2 Bug 1712486 - Add async front buffer posting for out-of-process WebGL r=jgilbert,lsalzman,gfx-reviewers
The async front buffer posting is going to be enabled by another bug.

Async IPC was added for async front buffer posting for out-of-process WebGL.
Client does not use TextureClient for storing SurfaceDescriptor.
It works basically same way as to in-process WebGL around nsDisplayCanvas, WebRenderCanvasData, WebRenderCommandBuilder and WebRenderBridgeParent.
SharedSurfaces of SurfaceDescriptorD3D10 are kept alive during their usage. It is for keeping a shread handle valid.
Copied data buffers of SharedShurface_Basics are kept alive during their usage. It is for keeping RenderBufferTextureHost valid.

Differential Revision: https://phabricator.services.mozilla.com/D150197
2022-06-29 05:05:47 +00:00
Kelsey Gilbert
c6b76d3b9a Bug 1776465 - GLBlitHelper link failure should go down link failure branch. r=gfx-reviewers,lsalzman
Also, no reason not to complete iteration across uTex[012], as opposed
to breaking early once we hit the first one that isn't present.
A shader with e.g. uTex1 but not uTex0 is weird, but there's no reason
for it not to work.

Differential Revision: https://phabricator.services.mozilla.com/D150270
2022-06-24 18:29:58 +00:00
stransky
1cdfeeec54 Bug 1774075 [Linux] Don't use EGL_MESA_image_dma_buf_export on mesa/radeonsi driver r=jgilbert
Don't use EGL_MESA_image_dma_buf_export on Mesa/radeonsi driver due to multi-thread crash there (https://gitlab.freedesktop.org/mesa/mesa/-/issues/6666)

Differential Revision: https://phabricator.services.mozilla.com/D149238
2022-06-20 10:14:41 +00:00
Robert Mader
d8d4d7a87a Bug 1773377 - Try EGL device platform for headless contexts, r=stransky,jgilbert
On multi-GPU setups, EGLs "surfaceless" platform may pick the wrong device.
There is a very recent extension which solves this issue,
`EGL_EXT_explicit_device`, however it states:
> Using EGL_EXT_explicit_device with EGL_MESA_platform_surfaceless is
> functionally identical to EGL_EXT_platform_device.

Thus, if we previously detected a render node device, use
`EGL_EXT_platform_device` to create the display in headless scenarios.

For all other cases, notably ARM SOCs where
`EGL_DRM_RENDER_NODE_FILE_EXT` is not yet availble, continue to
fall back to the surfaceless platform.

Note: this patch also does some cleanups. Most importantly,
`EGL_MESA_platform_surfaceless` is a client extension, not a
display extension. The check for it must thus always have failed.
Instead, check for it before trying to use it when creating the
display.
Also remove the rendundant redifinition in `GLDefs.h` - it's
already included in the upstream EGL headers.

Differential Revision: https://phabricator.services.mozilla.com/D148946
2022-06-13 23:15:37 +00:00
stransky
b887666c92 Bug 1735929 [Linux] Use EGL_MESA_image_dma_buf_export in SharedSurfaceDMABUF r=jgilbert,aosmond
- Update SharedSurfaceDMABUF for EGL_MESA_image_dma_buf_export DMABufSurface interface.
- Test surface export and import in SurfaceFactory_DMABUF::CanCreateSurface() to make sure it really works.

Depends on D147636

Differential Revision: https://phabricator.services.mozilla.com/D147637
2022-06-09 08:37:20 +00:00
stransky
08d59365a9 Bug 1735929 [Linux] Add support of EGL_MESA_image_dma_buf_export to GLLibraryEGL r=jgilbert,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D147635
2022-06-09 08:37:19 +00:00
Sylvestre Ledru
42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
Ashley Hale
2879b04886 Bug 1772947 - Remove dead code DecomposeIntoNoRepeatTriangles. r=gfx-reviewers,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D148455
2022-06-07 00:07:28 +00:00
Jamie Nicol
68af928298 Bug 1772849 - Annotate crash reports with eglCreateWindowSurface error code on Android. r=gfx-reviewers,jgilbert,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D148410
2022-06-06 18:12:39 +00:00
stransky
b292c031de Bug 1770560 [Linux] Implement GLBlitHelper::Blit(DMABufSurface* surface,...) to blit DMABufSurface directly r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146989
2022-06-06 13:31:03 +00:00
stransky
a3d16af2f2 Bug 1770407 [Linux] Remove GBM GL backend r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D147421
2022-05-28 20:13:42 +00:00
stransky
c85f81924d Bug 1770407 [Linux] Use MESA_platform_surfaceless GL backed on Linux instead of GBM one r=jgilbert
MESA_platform_surfaceless provides better alternative to GBM GL backend so let's use that instead of GBM.

Differential Revision: https://phabricator.services.mozilla.com/D147420
2022-05-28 20:13:42 +00:00
Emilio Cobos Álvarez
ddb8e6f491 Bug 1771146 - Check for gbm availability correctly before trying to create a surface. r=stransky,jgilbert
(And try to make it cheaper).

Differential Revision: https://phabricator.services.mozilla.com/D147312
2022-05-27 07:35:44 +00:00
Lee Salzman
8aba061809 Bug 1685375 - Remove ScopedXErrorHandler. r=jgilbert
Avoid relying on X11 errors to detect failures where alternative means would
suffice (i.e. checking results for failure or MakeCurrent failures). All other
users of ScopedXErrorHandler outside of GLContextProviderGLX use it only to
ignore errors rather than actually check the error result. Given those concerns,
we also change the default X11 error handler to merely ignore errors rather than
abort, such that X11 calls in Gecko no longer require an error trap by default.
This also avoids contention with other libraries that may temporarily override
the error handler such as GDK or Cairo since Gecko will never touch the handler
after startup.

Differential Revision: https://phabricator.services.mozilla.com/D147247
2022-05-26 16:13:27 +00:00
Cristian Tuns
21e50ef423 Backed out changeset b1345ce6dcd3 (bug 1685375) for causing xpcshell failures on test_crash_backgroundtask_moz_crash.js,nsX11ErrorHandler.cpp CLOSED TREE 2022-05-26 00:25:00 -04:00
Lee Salzman
2d5de179cb Bug 1685375 - Remove ScopedXErrorHandler. r=jgilbert
Avoid relying on X11 errors to detect failures where alternative means would
suffice (i.e. checking results for failure or MakeCurrent failures). All other
users of ScopedXErrorHandler outside of GLContextProviderGLX use it only to
ignore errors rather than actually check the error result. Given those concerns,
we also change the default X11 error handler to merely ignore errors rather than
abort, such that X11 calls in Gecko no longer require an error trap by default.
This also avoids contention with other libraries that may temporarily override
the error handler such as GDK or Cairo since Gecko will never touch the handler
after startup.

Differential Revision: https://phabricator.services.mozilla.com/D147247
2022-05-26 01:58:49 +00:00
stransky
a903faa3e1 Bug 1770111 [Linux] Build GLContextProviderLinux on other unix systems r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146816
2022-05-20 12:37:08 +00:00
Norisz Fay
840028742a Backed out changeset cde097a49a39 (bug 1770111) for causing build bustages on GLContextProvider.h CLOSED TREE 2022-05-20 10:25:35 +03:00
stransky
3da535a403 Bug 1770111 [Linux] Build GLContextProviderLinux on other unix systems r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146816
2022-05-20 07:12:22 +00:00
sotaro
4f8549101c Bug 1766282 - Do not use SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy r=jgilbert,jrmuizel,gfx-reviewers
With CI's NVIDIA GPU, SharedHandle of ID3D11Texture2D of hardware decoded video during no video copy caused rendering problem. When SharedHandle is not used, the rendering problem did not happen. But when video is rendered to WebGL texture, SharedHandle need to be used.
In this case, D3D11TextureIMFSampleImage copies original ID3D11Texture2D to a new ID3D11Texture2D and use a shared handled of the copied texture. And no video copy of future video frames are disabled.

NoCopyNV12Texture is renamed to ZeroCopyNV12Texture to clarify its meaning.

Differential Revision: https://phabricator.services.mozilla.com/D144598
2022-05-20 04:37:53 +00:00
Kelsey Gilbert
2bd9efd83a Bug 1770235 - DrawBlitProg::Draw non-vao path must restore vaa0's buffer. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146844
2022-05-19 23:00:33 +00:00
stransky
9f95c41a96 Bug 1769499 [Linux/EGL] Create GBM based surface for headless GL context r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146555
2022-05-19 15:18:22 +00:00
criss
dd9c3d30c8 Backed out changeset d13c0a1c7a19 (bug 1769499) for causing bustages on GLContextProviderEGL.cpp. CLOSED TREE 2022-05-19 10:27:48 +03:00
stransky
8979f28b18 Bug 1769499 [Linux/EGL] Create GBM based surface for headless GL context r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146555
2022-05-19 06:34:20 +00:00
stransky
9f92539de5 Bug 1769710 [Linux] Use GLContextProviderLinux on Linux r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146549
2022-05-18 12:01:50 +00:00
stransky
a734b8d21d Bug 1769710 [Linux] Remove GLContextProviderX11 r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146548
2022-05-18 12:01:50 +00:00
stransky
7ee135958e Bug 1769710 [Linux] Remove GLContextProviderWayland r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146547
2022-05-18 12:01:49 +00:00
stransky
126f981f9a Bug 1769710 [Linux] Add GLContextProviderLinux for GLX/EGL r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146546
2022-05-18 12:01:49 +00:00
Cristian Tuns
e7e8403c3b Backed out 4 changesets (bug 1769710) for causing build bustages on Android CLOSED TREE
Backed out changeset 05fe9638ac05 (bug 1769710)
Backed out changeset 7ddd8fdfe957 (bug 1769710)
Backed out changeset b8191e074d6d (bug 1769710)
Backed out changeset 202d09293cf2 (bug 1769710)
2022-05-18 03:09:03 -04:00
stransky
8555fad567 Bug 1769710 [Linux] Use GLContextProviderLinux on Linux r=jgilbert
Depends on D146548

Differential Revision: https://phabricator.services.mozilla.com/D146549
2022-05-18 06:43:48 +00:00
stransky
d1b8efc7b4 Bug 1769710 [Linux] Remove GLContextProviderX11 r=jgilbert
Depends on D146547

Differential Revision: https://phabricator.services.mozilla.com/D146548
2022-05-18 06:43:48 +00:00
stransky
d880bc82cf Bug 1769710 [Linux] Remove GLContextProviderWayland r=jgilbert
Depends on D146546

Differential Revision: https://phabricator.services.mozilla.com/D146547
2022-05-18 06:43:47 +00:00
stransky
6891e2856b Bug 1769710 [Linux] Add GLContextProviderLinux for GLX/EGL r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146546
2022-05-18 06:43:47 +00:00
Kelsey Gilbert
e722cdd3ed Bug 1703654 - Prototype display-p3 for WebGL canvas. r=lsalzman,emilio,webidl,smaug
Enable (direct) external surface compositing for MacIOSurfaces.
Works on Mac.

Differential Revision: https://phabricator.services.mozilla.com/D144073
2022-05-02 23:54:09 +00:00
Csoregi Natalia
9a8af5a95a Backed out changeset 718ead395698 (bug 1703654) for causing bustage on IPCMessageUtils.h. CLOSED TREE 2022-04-29 00:38:28 +03:00
Kelsey Gilbert
c3a7e39783 Bug 1703654 - Prototype display-p3 for WebGL canvas. r=lsalzman,emilio
Enable (direct) external surface compositing for MacIOSurfaces.
Works on Mac.

Differential Revision: https://phabricator.services.mozilla.com/D144073
2022-04-28 19:12:08 +00:00
Molnar Sandor
68045e3d85 Backed out changeset 071aa43a0419 (bug 1703654) for causing build bustages in SharedSurfaceDMABUF. CLOSED TREE 2022-04-26 20:14:48 +03:00
Kelsey Gilbert
9f7815a9e2 Bug 1703654 - Prototype display-p3 for WebGL canvas. r=lsalzman,emilio
Enable (direct) external surface compositing for MacIOSurfaces.
Works on Mac.

Differential Revision: https://phabricator.services.mozilla.com/D144073
2022-04-26 16:54:17 +00:00
ganguin
9396739e3c Bug 1661450 - 5/8 Fix build system to handle undefined MOZ_X11 r=stransky
Force usage of EGL when building for wayland only.

Enable build component that get disabled by undefined MOZ_X11 but are required
for MOZ_WAYLAND.

Depends on D139530

Differential Revision: https://phabricator.services.mozilla.com/D139531
2022-04-20 09:32:08 +00:00
criss
8d62d22b30 Backed out 10 changesets (bug 1661450) for causing build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 2c41d82de0c5 (bug 1661450)
Backed out changeset 5f58fcd7ac0b (bug 1661450)
Backed out changeset 62e56a6dcd22 (bug 1661450)
Backed out changeset 4b422ffa729f (bug 1661450)
Backed out changeset 6ca4705772da (bug 1661450)
Backed out changeset 031a6313459f (bug 1661450)
Backed out changeset 06ddf05e97d6 (bug 1661450)
Backed out changeset 4388b1b9aafd (bug 1661450)
Backed out changeset 600f9fd09fa6 (bug 1661450)
Backed out changeset cc5e8efe3ebf (bug 1661450)
2022-04-19 12:25:14 +03:00
ganguin
297f530b7c Bug 1661450 - 5/8 Fix build system to handle undefined MOZ_X11 r=stransky
Force usage of EGL when building for wayland only.

Enable build component that get disabled by undefined MOZ_X11 but are required
for MOZ_WAYLAND.

Depends on D139530

Differential Revision: https://phabricator.services.mozilla.com/D139531
2022-04-19 08:35:27 +00:00
Andrew Osmond
dfd75c103a Bug 1761832 - Protect GLLibraryEGL singleton against race conditions. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D142257
2022-03-28 21:16:58 +00:00
Kelsey Gilbert
5362a1dd62 Bug 1449575 - Don't attempt ColorMask elision in WebGL. r=gfx-reviewers,aosmond
* Always use DoColorMask(u32?, u8) in webgl code.
* Handle OES_draw_buffers_indexed ColorMaski in GLBlitHelper.

Differential Revision: https://phabricator.services.mozilla.com/D141543
2022-03-24 19:39:06 +00:00
Randell Jesup
fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli
2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup
4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila
927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup
7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00