egl/wayland: explain why implicit modifier downgrade is allowed

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>
This commit is contained in:
Simon Ser 2024-02-28 16:53:09 +01:00 committed by Marge Bot
parent 35143febba
commit af41fad1e9

View file

@ -1425,6 +1425,12 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
dri2_surf ? dri2_surf->wl_drm_wrapper : dri2_dpy->wl_drm;
int fd = -1, stride;
/* wl_drm doesn't support explicit modifiers, so ideally we should bail
* out if modifier != DRM_FORMAT_MOD_INVALID. However many drivers will
* return a valid modifier when querying the DRIImage even if a buffer
* was allocated without explicit modifiers.
* XXX: bail out if the buffer was allocated without explicit modifiers
*/
if (num_planes > 1)
return NULL;