I’m trying to compile the latest SDL2 with the mali fb driver, but there doesn’t appear to be any option for it (enable-video-mali
)
I’m trying to do this with buildroot-2015.11.1 configured for the board that I’m targeting and it does have libMali.so
I tried this configure command and it does let it build, but there doesn’t appear to be any valid video driver
./configure --disable-video-directfb --disable-video-rpi --disable-video-x11-xcursor --disable-video-x11-xinerama --disable-video-x11-xinput --disable-video-x11-xrandr --disable-video-x11-scrnsaver --disable-video-x11-vm --disable-video-x11 --without-x --disable-video-opengl --enable-video-opengles --disable-input-tslib --disable-oss --enable-alsa --enable-alsa-shared --disable-dbus --enable-video-kmsdrm --host=arm-linux --prefix=/usr
I’m not aware of any Mali-specific code in SDL…?
Is it possible there’s some other thing (like KMSDRM) that needs libMali.so behind the scenes, but just looks like OpenGL and EGL to SDL?
(so many acronyms! heh)
It’s possible I’m misunderstanding, too.
–ryan.
q3dev
June 12, 2020, 4:50am
3
Dan,
If you’re looking for mali-fbdev support you’ll have to use one of the SDL forks where support has been added. A few of the forks that I know of are here:
https://github.com/mihailescu2m/libsdl2-2.0.2-dfsg1/tree/mali/src/video/mali-fbdev
https://github.com/RetroPie/SDL-mirror/commit/ab0cc17c
There may be other forks out there that are more up-to-date or better suited for your needs, so you may want to look around. You could also make a patch from the 2.0.2 version above and apply it to the latest SDL2.
Hope that helps.
1 Like
By the way, after finding this post I spent some time making a patch for mali support in SDL 2.30.6:
2.30.6-0001-add-mali-fb-support.patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e135490a..79aff66c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -474,6 +474,7 @@ set_option(SDL_WASAPI "Use the Windows WASAPI audio driver" ${WINDO
set_option(SDL_RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
set_option(SDL_RENDER_METAL "Enable the Metal render driver" ${APPLE})
set_option(SDL_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
+set_option(SDL_MALI "Use Mali EGL video driver" ${UNIX_SYS})
dep_option(SDL_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
This file has been truncated. show original
Based on the first link from q3dev.
I only tested it with cmake, not confident about the autotools configure script.
2 Likes