render/egl: try GBM platform if device platform fails to initialize

Mesa could generate EGL devices that cannot be used for eglInitialize(),
e.g. in the case of a vmwgfx device w/o 3D acceleration enabled.

Continue to try GBM platform instead of bailing out when device platform
fails to initialize.

This fixes launch of wlroots-based compositors on VirtualBox VMs w/o 3D
acceleration enabled.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
This commit is contained in:
Icenowy Zheng 2026-05-13 23:55:05 +08:00 committed by Icenowy Zheng
parent e4a1268b2a
commit cf535d8590

View file

@ -575,9 +575,8 @@ struct wlr_egl *wlr_egl_create_with_drm_fd(int drm_fd) {
wlr_log(WLR_DEBUG, "Using EGL_PLATFORM_DEVICE_EXT");
return egl;
}
goto error;
}
/* Falls back on GBM in case the device was not found */
/* Falls back on GBM in case the device was not found or do not work */
} else {
wlr_log(WLR_DEBUG, "EXT_platform_device not supported");
}