Closed SO5005 closed 1 month ago
I had a commit where we were calling LANG=C eglinfo
and just looking for EGL driver name: asahi
. Is that okay?
https://github.com/slp/krun.legacy/pull/4#discussion_r1590459236
It'd be very complex to try to call EGL APIs directly. But sure, we could do it if you don't mind more code... (Will just port it from here: https://github.com/mpv-player/mpv/blob/d347ee0e916de83e74fc4dca1d35300307ce3f6b/video/out/opengl/egl_helpers.c#L313)
I had a commit where we were calling
LANG=C eglinfo
and just looking forEGL driver name: asahi
. Is that okay?It'd be very complex to try to call EGL APIs directly. But sure, we could do it if you don't mind more code... (Will just port it from here: https://github.com/mpv-player/mpv/blob/d347ee0e916de83e74fc4dca1d35300307ce3f6b/video/out/opengl/egl_helpers.c#L313)
I think it's better to just check /proc/device-tree/model
or /proc/device-tree/compatible
. We can take advantage that GPUs are embedded in this computers so we can safely assume that the asahi mesa driver must be used on them.
@SO5005 do you want to give this approach a try on this PR?
Thanks for the PR! The plan was, on
krun
(the one that runs on the host), detect that we're running on Asahi and then exportMESA_LOADER_DRIVER_OVERRIDE
. @teohhanhui WDYT?