this is another case of bad dependencies leaving dri the only place to
move something, which then exposes some other snags to be resolved later
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
They're calling the same thing in the backend, so reduce the proliferation
of interfaces consumed within our implementation.
driVkImageExtensionSw now sets dri2_from_dma_bufs, which means that
egl_dri2 will now expose EXT_image_dma_buf_import. Given that it
previously set dri2_from_fds suggesting that it can import dmabufs, this
is presumably OK.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
We select the feedback tranche according to the image format but not the
actual format that we will use for presentation. This breaks direct
scanout in cases where the application selected a visual with an alpha
channel but using EGL_EXT_present_opaque which previously worked as
expected.
Fix this by selecting the feedback tranche according to the actual
presentation format.
Fixes: 9ea9a963aa ("egl/wayland: Fix EGL_EXT_present_opaque")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153>
When using the EGL_EXT_present_opaque extension we create wayland
buffers with the opaque variant of the surface format, while the
underlying image is created with the normal surface format. However,
there is no guarantee that the compositor supports that opaque format,
or that we can use that format with all the modifiers of the surface
format.
Since this is completely out of the control of the application, and the
compositor will disconnect the client with an error if the format is not
supported, this commit:
1. Fails EGL surface creation if it determines that the opaque format
cannot be used, either because it's not present at all, or because
it shares no modifier with the non-opaque format.
2. When creating the DRI image ensures that we use a modifier that's
also supported by the opaque format.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153>
Use the new DRI interface hooks to implement
eglQuerySupportedCompressionRatesEXT and the new
EGL_SURFACE_COMPRESSION_EXT attribute when creating a window
surface.
Only wayland support for now.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27109>
Both paths are pretty much the same no matter if we are using the
old format protocol or the dmabuf_feedback protocol.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27109>
The EGL_WL_create_wayland_buffer_from_image is still used in WPE WebKit.
There is work in progress to continue adoption of DMA-BUF usage inside
WebKit which will eventually render the extension unneeded; but in the
meantime an update to a version of Mesa without the extension would
render applications using WPE WebKit unusable.
This reverts commit a3418105b9.
Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29266>
This is just to get event tracing in perfetto, as the wrapper calls
MESA_TRACE_FUNC().
It can be useful to see how long and when we stall in wayland dispatch.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28634>
This extension was originally intended to complement
EGL_WL_bind_wayland_display.
The idea behind bind_wayland_display was that libEGL.so on the server
side could register Wayland extensions for libEGL.so on the client side
to use to create buffers, with eglQueryWaylandBufferWL being used to
query the buffer properties, and EGL_WAYLAND_BUFFER_WL added as an
EGLImage target for texturing.
eglCreateWaylandBufferFromImageWL was then to be used for nested
compositors to perform passthrough: it would take an EGLImage created by
the magical libEGL secret handshake, and make it usable in the parent
compositor by doing the same secret handshake again.
Since that original idea, we've just standardised dmabuf across the
Wayland ecosystem instead. The last known user of this extension was a
sample client in the Weston tree, which was broken quite some years ago
and never ported to the Meson build system when we moved.
Given it won't affect anyone, let's just remove this extension so no-one
thinks it would be a good idea to use it.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27793>
We break the rule that an explicit modifier cannot be stripped.
Fixing this would require a bit of effort and wl_drm is reaching
its end of life anyways, so leave a TODO instead.
Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26346>