Questions about mesa on Termux
Hello, mesa developers
Termux is a Linux emulator on Android, and it provides a Linux environment. Just like most of Linux distributions, it uses X11 to show GUI. In the past, mesa on Termux uses glx=xlib, but actually lots of applications use GLES + GLX rather than only GLX, so glx=dri is enabled recently.
The following drivers can work on Termux.
(1) swrast
(llvmpipe or softpipe) works pretty fine on Termux, but it works on CPU and it is not fast enough.
(2) virgl
(In more detail, virgl
in Termux's mesa and vtest_server
on GLES of Native Android). Mittron and alexvorxx makes it work for Android using an Android application for Exagear (a Windows Emulator for Android). Definitely it should be able to work on Termux, but I only got it work on ANGLE with vulkan backend, and thus the performance is not pretty good. (mesa-virgl <=> vtest_server <=> ANGLE <=> vulkan loader on Android <=> GPU).
The following drivers used to work on Termux.
(1) zink
with Android's vulkan. It used to work on Termux, but after kopper gets merged, Android's vulkan has Android WSI but actually kopper requests X11 WSI, it no longer works on Termux.
(2) zink
with freedreno-kgsl
. /dev/kgsl-3d0
can be accessed by user applications. It used to work with zink
. But the vulkan driver of kgsl
doesn't have WSI support, so it is impossible to work for zink
now.
Because Termux is an application on Android, there is many restrictions to access /dev
folder, so it seems impossible for Termux to use DRM/KMS driver directly, so zink
or virgl
could be some solutions for Termux to use GPU. I wonder whether it is possible for kopper
to work on Termux, and whether there is any other possible way for mesa on Termux to use GPU for hardware acceleration.
Thank you for any help you can provide.
Yours,
Chongyun Lee