termux / proot-distro

An utility for managing installations of the Linux distributions in Termux.
GNU General Public License v3.0
1.64k stars 192 forks source link

[Feature]: Using Termux Vulkan-Loaer with PRoot-Dsitro #402

Closed hansm629 closed 2 weeks ago

hansm629 commented 5 months ago

Feature description

hello. Thanks to Termux+PRoot, I have built a Linux desktop on my Android Device and am using it well.

There is one thing that is disappointing. GPU acceleration is limited in SoCs other than the Snapdragon series.

Snapdragon series through mesa turnip + Termux-X11 DRI3 patch GPU acceleration is possible with almost full performance in the PRoot-Distro Linux environment, but

Other SoCs (ex: Dimensity, Exynos, Tensor) support GPU acceleration through virglrenderer-android, but compatibility and performance are very poor.

In the Termux environment, GPU acceleration is possible by loading the Android host Vulkan driver through Vulkan-Loader and implementing WSI through sysvk & Vulkan WSI Layer. (OpenGL&OpenGL ES acceleration is possible when combined with mesa zink, and OpenCL3.0 acceleration is possible when combined with clvk)

Technically, in the mid- to long-term, in the PRoot-Distro environment, Is it possible to load Termux Vulkan-Loader?

twaik commented 5 months ago

Using sysvk and wsi layer is possible because both sysvk and wsi layer are compiled with bionic, and Android libraries (and drivers) are compiled with bionic too. In the case of proot using this solution will not be possible because it uses glibc. It is simply not compatible. Using libhybris is not an option because of local thread storage incompatibility of libraries.

hansm629 commented 5 months ago

@twaik So, is it okay to recognize that there is no other way to achieve GPU acceleration in a PRoot environment other than the Snapdragon series turnip?

At present, other SoCs do not show satisfactory compatibility in virgl, regardless of performance.

twaik commented 5 months ago

So, is it okay to recognize that there is no other way

It does not matter if it is ok or not. We do not have any choise.

hansm629 commented 5 months ago

@twaik There will be no choice unless a new, better solution emerges T^T

Or would it be faster to port existing Linux distribution packages to the Termux package?

twaik commented 5 months ago

There will be no choice unless a new, better solution emerges T^T

Pull requests are always welcome.

Or would it be faster to port existing Linux distribution packages to the Termux package?

I do not think so. Our team is pretty much small and can not process such a big amount of packages.

hansm629 commented 5 months ago

@twaik What do you think about the latest src's angle and virglrenderer?

As sir mentioned before, I am well aware that the latest is not necessarily the best.

However, I thought there might be some improvement in compatibility.

twaik commented 5 months ago

What do you think about the latest src's angle and virglrenderer?

I think nothing about it. I do not use this this software.

twaik commented 2 weeks ago

Closing this as not going to be implemented.