Commit Graph

121 Commits

Author SHA1 Message Date
Michel Dänzer 91b5a003a5 xwayland/glamor/gbm: Don't close fence_fd after xwl_glamor_wait_fence
eglCreateSyncKHR takes ownership of the file descriptor. Noticed by
inspection.

While we're at it, move the fence_fd declaration to the scope where
it's used.

Last but not least, close the fd in xwl_glamor_wait_fence when bailing
before calling eglCreateSyncKHR, and document that it takes ownership.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1712>
2024-10-22 16:26:09 +00:00
Michel Dänzer e6c649e6e6 xwayland/glamor: Try manual redirect only if parent window has depth 32
That's the case 8e8bc0a1ef ("xwayland: Try manual redirection for
surface window in glamor_check_flip") was intended for. If the parent
window doesn't have depth 32, the automatic redirection might have been
done by a client, in which case doing the manual redirection may run
into trouble.

Fixes: 8e8bc0a1ef ("xwayland: Try manual redirection for surface window in glamor_check_flip")
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1724
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1637>
2024-10-02 08:02:03 +00:00
Michel Dänzer 8e8bc0a1ef xwayland: Try manual redirection for surface window in glamor_check_flip
If the surface window already uses automatic redirection, we can upgrade
to manual redirection and save some blits with common use cases.

This fixes a minor performance regression from a65bb8480a ('Revert
"xwayland/glamor: Avoid implicit redirection with depth 32 parent
windows"') with mutter >= 44.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570>
2024-06-24 08:26:46 +00:00
Michel Dänzer ed575eee81 xwayland: Drop pixmap parameter from xwl_present_maybe_redirect_window
Never used.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1570>
2024-06-24 08:26:46 +00:00
Olivier Fourdan a65bb8480a Revert "xwayland/glamor: Avoid implicit redirection with depth 32 parent windows"
There are a number of regressions and hard to reproduce issues that find
their roots in this change, so revert it until those can be ironed out
some more.

This reverts commit 4bb1f976d5.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1655
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1656
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1457>
2024-04-11 07:33:19 +00:00
Michel Dänzer c7d56b0e29 xwayland/present: Redirect surface window as needed for page flips
It's needed when the surface window is a depth 24 descendant of a depth
32 toplevel window.

xwl_source_validate ensures the toplevel window pixmap has valid
contents when a client reads from it, or when the window hierarchy /
geometry changes. It's never called in the normal fullscreen application
case, so there's no GPU copy overhead with that.

v2:
* Don't try to redirect a depth 32 descendant of different-depth
  ancestors, the alpha channel wouldn't be handled correctly.
  (Olivier Fourdan)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1300>
2024-04-10 08:55:08 +00:00
Erik Kurzinger 87bf2cafcc xwayland: add support for wp_linux_drm_syncobj_v1
This protocol allows for explicit synchronization of GPU operations by
Wayland clients and the compositor. Xwayland can make use of this to
ensure any rendering it initiates has completed before the target image
is accessed by the compositor, without having to rely on kernel-level
implicit synchronization.

Furthermore, for X11 clients that also support explicit synchronization
using the mechanisms exposed in the DRI3 and Present extensions, this
Wayland protocol allows us to simply forward the timeline, acquire, and
release points directly to the compositor, ideally avoiding any
premature stalls in the presentation pipeline.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger 6f85ce4d4e xwayland: support DRI3 1.4 and Present 1.4
Together, DRI3 1.4 and Present 1.4 allow clients to explicitly
synchronize GPU rendering with presentation using DRM syncobjs. Here we
add the necessary support to Xwayland's glamor and Present
infrastructure to enable this functionality.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Olivier Fourdan 656d2efd4b xwayland/glamor: Drop xwl_glamor_needs_n_buffering()
This function always return TRUE now that EGLSTream is gone, so we can
remove it.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan d422b40926 xwayland/glamor: Drop xwl_glamor_needs_buffer_flush()
GLAMOR needs that, and the function returns TRUE unless GLAMOR is not
used.

Drop the function xwl_glamor_needs_buffer_flush() and call
glamor_block_handler() when glamor is used.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan 8c0267b60f xwayland/glamor: Drop init_backend() and select_backend()
Now that we have only one backend, there is no need to initialize or
select between different backends.

Drop the corresponding functions.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan bceaca28d3 xwayland/glamor: Remove the backend pointers
We have only one backend now.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan 863ee2da4d xwayland/glamor: Make xwl_glamor_has_wl_interfaces() private
It's not used outside of Xwayland GLAMOR code itself, no need to keep it
public.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan 4eb8684f52 xwayland/glamor: Drop the allow_commit() hook
That was used only by the EGLStream backend, we can remove it.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan 6fd77acd91 xwayland/glamor: Drop the post_damage() hook
That was used only with the EGLStream backend, we can remove it.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan 5fd0c92b0e xwayland/glamor: Remove the flag "is_available"
Now that we have only one GBM backend, either it is available and
usable, or we cannot use GLAMOR.

Therefore we can drop the flag "is_available".

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:18 +00:00
Olivier Fourdan 63e2f98f0a xwayland/glamor: Drop the backend_flags
We do not need these anymore, since we only have the GBM backend left.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan 925a218b4b xwayland/glamor: Drop the create_pixmap_for_window() hook
And rename the function xwl_glamor_gbm_create_pixmap_for_window() as
xwl_glamor_create_pixmap_for_window().

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan e8d974a8d3 xwayland/glamor: Drop the check_flip() hook
The GBM backend never had a use for it.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan 76ae669327 xwayland/glamor: Drop the get_wl_buffer_for_pixmap() hook
And rename the GLAMOR GBM xwl_glamor_gbm_get_wl_buffer_for_pixmap()
function as xwl_glamor_pixmap_get_wl_buffer().

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan e60e00ff40 xwayland/glamor: Drop the init_screen() hook
And call xwl_glamor_gbm_init_screen() directly instead.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan e1bec429bb xwayland/glamor: Drop the init_egl() hook.
And call xwl_glamor_gbm_init_egl() directly instead.

Yet, keep the function separate rather than merging it back into
xwl_glamor_init() for clarity of the code.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan ca73cd8a9d xwayland/glamor: Drop xwl_glamor_gbm_has_wl_interfaces()
And merge it back into xwl_glamor_has_wl_interfaces()

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan 2ccabf5aa8 xwayland/glamor: Drop xwl_glamor_gbm_init_wl_registry()
And merge it back into xwl_glamor_init_wl_registry().

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan 673ed3cd6d xwayland/glamor: Add a GLAMOR GBM header
That will be used between the generic Xwayland GLAMOR functions and the
GBM implementation.

Move the definition of xwl_glamor_init_gbm() to that new header rather
than in the generic Xwayland GLAMOR header.

This is preparation work to eventually replace the xwl_egl_backend now
that we have only one backend left.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan 701284f057 xwayland/glamor: Drop the EGLStream backend
Now that the NVIDIA proprietary driver has grown support for GBM, the
EGLStream backend for NVIDIA GPUs is now superseded by the standard
GBM backend in Xwayland.

This code path is therefore not used and hardly ever tested.

Remove support for EGLStream in Xwayland.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan 722ea5d000 xwayland: Move dmabuf code to its own source file
The dmabuf support code is scattered across different source files,
making it hard to follow and bloating unrelated sources.

Move the dmabuf related source code to its own source files.

This is just a cleanup aimed at helping with code readability, no
functional change intended.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1111>
2024-03-14 15:00:46 +01:00
Michel Dänzer af4b64d227 xwayland: Rename xwl_window_recycle_pixmap to xwl_window_realloc_pixmap
It doesn't recycle anything but allocates a new pixmap from scratch.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1314>
2024-03-06 16:55:13 +01:00
Michel Dänzer c1c5bf382e xwayland: Do not plumb damage region through function parameters
Each function can get the damage region from the xwl_window instead.
Add xwl_window_get_damage_region helper for this.

v2:
* Use xwl_window_get_damage_region in xwl_window_attach_buffer as well
  (Olivier Fourdan)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1314>
2024-03-06 16:55:13 +01:00
Enrico Weigelt, metux IT consult 06685cabde composite: move out unexported CompositeIsImplicitRedirectException()
Move out non-exported stuff from public module header compositeext.h,
into compositeext_priv.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1284>
2024-03-03 22:50:07 +00:00
Florian Weimer f0a187f55d xwayland: Use correct pointer types on i386
And other 32-bit architectures, where uint32_t and CARD32 are
not the same type.  Otherwise the build will fail with GCC 14
with errors like:

../hw/xwayland/xwayland-glamor.c: In function ‘xwl_glamor_get_formats’:
../hw/xwayland/xwayland-glamor.c:291:43: error: passing argument 3 of ‘xwl_get_formats_for_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  291 |                                           num_formats, formats);
      |                                           ^~~~~~~~~~~
      |                                           |
      |                                           CARD32 * {aka long unsigned int *}
../hw/xwayland/xwayland-glamor.c:238:38: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘CARD32 *’ {aka ‘long unsigned int *’}
  238 |                            uint32_t *num_formats, uint32_t **formats)
      |                            ~~~~~~~~~~^~~~~~~~~~~
../hw/xwayland/xwayland-glamor.c:291:56: error: passing argument 4 of ‘xwl_get_formats_for_device’ from incompatible pointer type [-Wincompatible-pointer-types]
  291 |                                           num_formats, formats);
      |                                                        ^~~~~~~
      |                                                        |
      |                                                        CARD32 ** {aka long unsigned int **}
../hw/xwayland/xwayland-glamor.c:238:62: note: expected ‘uint32_t **’ {aka ‘unsigned int **’} but argument is of type ‘CARD32 **’ {aka ‘long unsigned int **’}
  238 |                            uint32_t *num_formats, uint32_t **formats)
      |                                                   ~~~~~~~~~~~^~~~~~~
../hw/xwayland/xwayland-glamor.c:295:28: error: passing argument 3 of ‘xwl_get_formats’ from incompatible pointer type [-Wincompatible-pointer-types]
  295 |                            num_formats, formats);
      |                            ^~~~~~~~~~~
      |                            |
      |                            CARD32 * {aka long unsigned int *}
../hw/xwayland/xwayland-glamor.c:217:26: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘CARD32 *’ {aka ‘long unsigned int *’}
  217 |                uint32_t *num_formats, uint32_t **formats)
      |                ~~~~~~~~~~^~~~~~~~~~~
../hw/xwayland/xwayland-glamor.c:295:41: error: passing argument 4 of ‘xwl_get_formats’ from incompatible pointer type [-Wincompatible-pointer-types]
  295 |                            num_formats, formats);
      |                                         ^~~~~~~
      |                                         |
      |                                         CARD32 ** {aka long unsigned int **}
../hw/xwayland/xwayland-glamor.c:217:50: note: expected ‘uint32_t **’ {aka ‘unsigned int **’} but argument is of type ‘CARD32 **’ {aka ‘long unsigned int **’}
  217 |                uint32_t *num_formats, uint32_t **formats)
      |                                       ~~~~~~~~~~~^~~~~~~
2024-02-02 09:36:52 +01:00
Michel Dänzer abe3a08245 xwayland: Enable Present extension support also without glamor
This allows e.g.

 xfwm4 --vblank=xpresent

to hit the page flip path instead of copies.

In the future, Mesa might also use the Present extension with software
rendering.
2024-01-22 14:14:05 +00:00
Michel Dänzer 6779ec5bf6 xwayland: Use window pixmap as a window buffer
Assuming the same number of window buffers, this results in one less
pixmap per toplevel window, saving pixmap storage.

v2:
* Preserve xwl_window_buffer_get_available behaviour (Olivier Fourdan)
v3:
* Leave RegionEmpty call where it was in xwl_window_buffers_get_pixmap,
  so it takes effect for a newly allocated struct xwl_window_buffer.
* Consolidate xwl_window_buffer->pixmap assignment in the same place.
2024-01-10 17:31:42 +00:00
Michel Dänzer 2b577c2e3b xwayland: Drop xwl_window_buffers_recycle
Use xwl_window_buffers_dispose instead. The pixmaps will need to be
re-created anyway, so keeping around the xwl_window_buffers doesn't
buy much. And dropping this makes the next commit simpler.

Also fold xwl_window_buffer_destroy_pixmap into its only remaining
caller,  xwl_window_buffer_maybe_dispose.

v2: (Olivier Fourdan)
* Fix up indentation in xwl_window_set_window_pixmap
* Leave xwl_window_buffer_destroy_pixmap helper
2024-01-10 17:31:42 +00:00
Adam Jackson 58b88ba0b1 glamor: Lift the GLX EGL backend from Xwayland
This code is almost entirely ddx-agnostic already, and I'd like to use
it from the other EGL glamor consumers. Which, right now that's just
Xorg, but soon it'll be Xephyr too.
2023-11-07 17:59:24 +03:00
Konstantin Pugin 3caf7aa88d glamor: add glvnd_vendor private
This commit adds an ability to store a glvnd vendor in Glamor
structures, which can be used for initialize some vendor-based values
without hooking into DDX internals. Also this adds setting this value
into Xorg and Xwayland

Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Emma Anholt <emma@anholt.net>
2023-11-07 17:59:24 +03:00
Michel Dänzer 4bb1f976d5 xwayland/glamor: Avoid implicit redirection with depth 32 parent windows
glamor ensures that a depth 32 pixmap backing a depth 24 window contains
fully opaque alpha channel values for the window's pixels, so we can
allow this without implicit redirection, saving pixmap storage and
intermediate copies.

Second attempt, after fixing a few regressions from the first attempt.
2023-07-20 10:15:15 +02:00
Olivier Fourdan c4ee35ef24 Revert "xwayland/glamor: Avoid implicit redirection with depth 32 parent windows"
This commit is meant as an optimization, but has been identified as the
cause of multiple regressions reported in issues xorg/xserver#1564 and
xorg/xserver#1565.

Reverting that commit alone fixes the aforementioned issues, the rest of
the commits from xorg/xserver!1131 seem harmless and do not need
reverting.

This reverts commit d6c5999e94.

See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1564
See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1565
2023-07-19 17:05:25 +02:00
Michel Dänzer d6c5999e94 xwayland/glamor: Avoid implicit redirection with depth 32 parent windows
glamor ensures that a depth 32 pixmap backing a depth 24 window contains
fully opaque alpha channel values for the window's pixels, so we can
allow this without implicit redirection, saving pixmap storage and
intermediate copies.
2023-07-18 09:34:39 +00:00
Michel Dänzer c38442bc30 xwayland/glamor: Require equal pixmap depths in xwl_glamor_check_flip
This will be needed with the next commit: If a child window completely
obscures a toplevel ancestor of different depth, the child window can
use page flipping only if the depth of the presented pixmap matches that
of the window's backing pixmap, or the former may contain pixel values
which are not suitable for the toplevel window's depth.
2023-07-18 09:34:39 +00:00
Olivier Fourdan 967ad0fa1e xwayland: Add xwl_glamor_get_drawable_modifiers_and_scanout()
Add a new API similar to xwl_glamor_get_drawable_modifiers() but also
returning whether the format and modifiers are from a tranche which
supports scanout.

This is preparation work for adding scanout support with
gbm_bo_create_with_modifiers2() when supported.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-12 10:44:25 +02:00
Olivier Fourdan 81458a86bf xwayland: Recycle buffers when dmabuf feedback changes
Whenever the linux-dmabuf v4 feedback changes, we need to recreate the
existing buffers so they use the current linux-dmabuf v4 feedback.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-03 11:46:15 +02:00
Olivier Fourdan 1ac3dd77d5 xwayland: Add a direct hook to create pixmaps with glamor
With linux dmabuf v4 support, for direct scanout support, we need more
context that just what CreatePixmap() provides, as we need the actual
drawable to invoke xwl_glamor_get_drawable_modifiers().

Add a specific hook in Xwayland's glamor implementation that we can use
for that purpose.

This is preparation work for the direct scanout fixes.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-03 11:46:15 +02:00
Olivier Fourdan a4c700231d xwayland: Check for implicit scanout availability
With implicit modifiers, DRM_FORMAT_MOD_INVALID is an allowed modifier,
to indicate that the server can support the format.

When looking for a scanout capable tranche with implicit modifiers, we
ought to check for the availability of a tranche with an invalid
modifier for the given format.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-03 11:46:15 +02:00
Olivier Fourdan 79ab129fdf xwayland: Check for scanout support in tranches
The helper function xwl_feedback_is_modifier_supported() walks all the
formats of a feeedback tranche and checks for format/modifier support
availability.

Add scanout support to that so that a caller can easily restrict the
tranches to those which support scanout.

This is preparation work for the implicit scanout support, no functional
change.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-03 11:46:15 +02:00
Olivier Fourdan 1a0cc25d48 xwayland: Use a dedicated feedback callback for windows
Separate the callbacks for the default's feedback from the one for
regular windows.

This is preparation work to recreate the window buffer of feedback
updates, no functional change.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-03 11:46:15 +02:00
Simon Ser 6f0b9deed6 xwayland: use drmDevice to compare DRM devices
The linux_dmabuf_v1 protocol doesn't guarantee any DRM node type:
the compositor may send a primary node or a render node. Use
drmDevice so that device comparisons are node-type-insensitive.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1447
2023-03-03 14:18:49 +00:00
Michel Dänzer df75d90a2c xwayland: Spell Xwayland consistently in error messages 2023-02-13 13:02:55 +00:00
Austin Shafer d67383a695 xwayland: Send PresentCompleteModeSuboptimalCopy if dmabuf feedback was resent
If the dmabuf protocol's feedback object gave us a new list of
modifiers, send PresentCompleteModeSuboptimalCopy to the client
to inform them that they need to call GetSupportedModifiers.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-01-20 17:56:54 +00:00
Austin Shafer f0415beb9f xwayland: Add proper support for telling if a format/mod is supported
This adds to xwl_glamor_is_modifier_supported, where if feedback
is in use we will check that the format/mod is allowed in any
device advertised by the compositor.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>

[ Michel Dänzer:
* Move dev_formats declaration to where it's used in
  xwl_feedback_is_modifier_supported
* Add curly braces around multi-line statement in
  xwl_glamor_is_modifier_supported ]
2023-01-20 17:56:54 +00:00