diff options
author | Christopher James Halse Rogers <[email protected]> | 2020-03-24 14:19:51 +1100 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2020-04-29 11:29:40 +0100 |
commit | 98675d34c115e3a8db9b6b74e8eca01af5fff101 (patch) | |
tree | f80994de2ac8038e90bb90a1d7056f945e496b20 /include | |
parent | 8f0d3874411ec3c0dcb1171cad5930db70fb48b4 (diff) |
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 <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Reviewed-by: Simon Ser <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4294>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions