egl/wayland: Fix zwp_linux_dmabuf usage

Merged Christopher James Halse Rogers requested to merge RAOF/mesa:fix-2220 into master

There's no guarantee that the formats advertised by wl_drm and the formats advertised by zwp_linux_dmabuf_v1 are the same.

get_back_bo() handles this by falling back from createImageWithModifiers() to createImage() when there's a wl_drm format but no corresponding linux_dmabuf format, but create_wl_buffer() unconditionally tries to create a linux_dmabuf buffer unless DRIimage has DRM_FORMAT_MOD_INVALID.

Fix this by always checking if the DRIimage modifier has been advertised by zwp_linux_dmabuf_v1, and falling back to wl_drm if not.

Closes: #2220 (closed) Signed-off-by: Christopher James Halse Rogers

Edited by Christopher James Halse Rogers

Merge request reports