mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 11:40:12 +01:00
xwayland: don't fall back to wl_drm with explicit modifier
It's incorrect to strip an explicit modifier. Daniels' docs [1]
states:
> when importing a buffer, the user may supply `DRM_FORMAT_MOD_INVALID` as the
> buffer modifier (or not supply a modifier) to indicate that the modifier is
> unknown for whatever reason; this is only acceptable when the buffer has
> not been allocated with an explicit modifier
[1]: https://lore.kernel.org/dri-devel/20210905122742.86029-1-daniels@collabora.com/
Signed-off-by: Simon Ser <contact@emersion.fr>
(cherry picked from commit c6f2598a4e)
This commit is contained in:
parent
fd27fc3f22
commit
e1133bcd52
1 changed files with 1 additions and 1 deletions
|
|
@ -433,7 +433,7 @@ xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap)
|
||||||
zwp_linux_buffer_params_v1_create_immed(params, width, height,
|
zwp_linux_buffer_params_v1_create_immed(params, width, height,
|
||||||
format, 0);
|
format, 0);
|
||||||
zwp_linux_buffer_params_v1_destroy(params);
|
zwp_linux_buffer_params_v1_destroy(params);
|
||||||
} else if (num_planes == 1) {
|
} else if (num_planes == 1 && modifier == DRM_FORMAT_MOD_INVALID) {
|
||||||
xwl_pixmap->buffer =
|
xwl_pixmap->buffer =
|
||||||
wl_drm_create_prime_buffer(xwl_gbm->drm, prime_fds[0], width, height,
|
wl_drm_create_prime_buffer(xwl_gbm->drm, prime_fds[0], width, height,
|
||||||
format,
|
format,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue