1
0
Fork 0

wayland/drm-syncobj: Check for sync-fd cogl feature

The syncobj implementation uses cogl_context_get_latest_sync_fd(), so
check that that function will actually work.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3475
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3771>
This commit is contained in:
Jonas Ådahl 2024-05-23 15:52:53 +02:00 committed by Marge Bot
parent c192f51159
commit 6b3a289ab5

View file

@ -465,6 +465,13 @@ meta_wayland_drm_syncobj_manager_new (MetaWaylandCompositor *compositor,
g_assert (backend && egl && clutter_backend && cogl_context && egl_display); g_assert (backend && egl && clutter_backend && cogl_context && egl_display);
if (!cogl_has_feature (cogl_context, COGL_FEATURE_ID_SYNC_FD))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
"Missing 'EGL_ANDROID_native_fence_sync'");
return NULL;
}
if (!meta_egl_query_display_attrib (egl, egl_display, if (!meta_egl_query_display_attrib (egl, egl_display,
EGL_DEVICE_EXT, &attrib, EGL_DEVICE_EXT, &attrib,
error)) error))