mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-21 11:08:24 +02:00
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. If DRM_FORMAT_MOD_INVALID has been advertised then we trust the client has allocated something appropriate and treat any modifier as matching. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2220 Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4294> |
||
|---|---|---|
| .. | ||
| egl_dri2.c | ||
| egl_dri2.h | ||
| egl_dri2_fallbacks.h | ||
| platform_android.c | ||
| platform_device.c | ||
| platform_drm.c | ||
| platform_surfaceless.c | ||
| platform_wayland.c | ||
| platform_x11.c | ||
| platform_x11_dri3.c | ||
| platform_x11_dri3.h | ||