wayland/dma-buf: Always send modifiers when using surfaceless

We'll never scan out, which is why ADDFB2 is required otherwise, and we
won't enable the DMA buffer extension if
'EGL_EXT_image_dma_buf_import_modifiers' is missing, so send modifiers
in this case.

This also happens to avoid crashing when the GPU is null, since we'd
otherwise attempt to dereference it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2578>
This commit is contained in:
Jonas Ådahl 2022-08-17 12:29:40 +02:00 committed by Marge Bot
parent 44dae3e160
commit 1d4cdd1eb5

View File

@ -162,6 +162,9 @@ should_send_modifiers (MetaBackend *backend)
renderer_native = META_RENDERER_NATIVE (meta_backend_get_renderer (backend));
gpu_kms = meta_renderer_native_get_primary_gpu (renderer_native);
if (!gpu_kms)
return TRUE;
kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
flags = meta_kms_device_get_flags (kms_device);