kmsro advertises EGL_MESA_device_software
Mesa version: recent commit 86ff78e8
- Have a SoC with split display/render devices. I used Rockchip with the display-only device at
/dev/dri/card0
and the render-only device at/dev/dri/card1
+/dev/dri/renderD128
. - Initialize EGL with the GBM platform and the display-only device:
gbm_device = gbm_create_device("/dev/dri/card0")
thenegl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_GBM_KHR, gbm_device, NULL)
- kmsro kicks in and uses the driver for the render-only device under-the-hood (for me, Panfrost)
- Query the EGL device from the EGL display:
eglQueryDisplayAttribEXT(egl_display, EGL_DEVICE_EXT, &egl_device)
- Query EGL device extensions:
eglQueryDeviceStringEXT(egl_device, EGL_EXTENSIONS)
The string will contain EGL_MESA_device_software
even though EGL uses Panfrost.
Full client code: https://github.com/swaywm/wlroots/blob/a406f1947978e5db32615aeea095eab6a5bc19b1/render/egl.c#L275
Edited by Simon Ser