mesa/src/egl
Christopher James Halse Rogers 98675d34c1 egl/wayland: Fix zwp_linux_dmabuf usage
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>
2020-04-29 11:29:40 +01:00
..
drivers egl/wayland: Fix zwp_linux_dmabuf usage 2020-04-29 11:29:40 +01:00
generate EGL: Add eglSetDamageRegionKHR to GLVND dispatch list 2020-04-03 12:22:51 +01:00
main egl: simplify client/platform extension handling 2020-04-21 22:20:24 +00:00
wayland egl/wayland: Add FP16 format support 2019-09-20 19:10:31 +00:00
Android.mk egl: add EGL_platform_device support 2019-06-05 13:35:21 -04:00
egl-entrypoint-check.py egl: rewrite entrypoints check 2019-07-10 11:27:51 +00:00
egl-glvnd-symbols.txt egl: add glvnd symbols check 2019-07-10 11:27:51 +00:00
egl-symbols.txt egl: use new symbols check script 2019-07-10 11:27:51 +00:00
Makefile.sources egl: drop empty eglfallbacks.c 2019-06-25 06:36:54 +00:00
meson.build Revert "egl: put full path to libEGL_mesa.so in GLVND json" 2020-02-06 00:19:13 +00:00