Virpipe in Android container with non-mesa driver
I've spent some time attempting to get Mesa to run in an Android container on a Linux system (more specifically using Waydroid) to no avail.
My idea is to run virgl server outside of the container and then mount the unix socket into the container. This so far works as expected, but the issue seems to come down to how EGL is implemented on the android platform in Mesa.
Mesa is unable to obtain any DRM device inside the container (I did pass through the NVIDIA GPU, but as expected it fails to open because I'm running the proprietary NVIDIA driver and not nouveau). This so far is expected, however, what I did not expect is Mesa to require a DRM device when running with VirGL.
I modified Mesa to fall back to swrast
and also swrast_kms
(that seems to run fine on the NVIDIA GPU [or I did it entirely wrong]?), but at some point causes a null pointer dereference because apparently there is no DMABUF support.
For reference, my configuation options:
--cross-file cross-android-x86_64
-Dvulkan-drivers=
-Dgallium-drivers=virgl
-Dplatforms=android
-Dplatform-sdk-version=29
-Dandroid-stub=true
-Degl=enabled
-Dandroid-libbacktrace=disabled
-Dglvnd=disabled
--prefix /projects/public/mesa/INSTALL
This now boils down to either a feature request or more of a question: Is it currently possible to run Virpipe inside an environment where no DRM device is available on Android? Am I just doing it wrong and not compiling mesa with the correct options?