termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.96k stars 301 forks source link

[question]virglrender and android libEGL library #254

Closed kde-yyds closed 1 year ago

kde-yyds commented 1 year ago

Is it possible to make virglrender work with android's libEGL and libGLES library and without mesa libgbm and libgl? It seems that virgl_test_server --use-egl-surfaceless still uses libGL.so

twaik commented 1 year ago

As fa r as I know there are two options to launch virgl_test_server in termux.

  1. Described here, which uses zink as a backend.
  2. Using overlays, which requires root.

termux-x11 itself is x11vnc like app, simply making screenshots when server repots screen is changed and sends input events to back to X server. It does not support any acceleration in any way. That is a work of X server.

IntinteDAO commented 1 year ago

@kde-yyds you have now virglrenderer-android with virgl_test_server_android

kde-yyds commented 1 year ago

@kde-yyds you have now virglrenderer-android with virgl_test_server_android

It's great! I can now get chromium work smoothly through virglrender-android. But kwin and compiz crash all the time. It's probably a bug of virglrender because the same happens on my computer.

dontknowhy commented 1 year ago

@kde-yyds you have now virglrenderer-android with virgl_test_server_android

It's great! I can now get chromium work smoothly through virglrender-android. But kwin and compiz crash all the time. It's probably a bug of virglrender because the same happens on my computer.

Sadly i can't make virglrenderer-android works on my device(

pierreduf commented 1 year ago

Me neither :(

@kde-yyds you have now virglrenderer-android with virgl_test_server_android

It's great! I can now get chromium work smoothly through virglrender-android. But kwin and compiz crash all the time. It's probably a bug of virglrender because the same happens on my computer.

Hi @kde-yyds, I'm curious about how you made virglrenderer-android worked in termux. On my side I did :

But I've got an error when I use it in my proot with GALLIUM_DRIVER = virpipe.

I've also tried those commands : https://github.com/ThieuMinh26/Box4Droid but have the same error (when launching glmark2 eg.) : cso_unbind_context: assertionmaxsam <= pipe_max_samplers' failed.`

Would you be able to detail your setup and method (eg. how did you run chromium with acceleration) ?

kde-yyds commented 1 year ago

Me neither :(

@kde-yyds you have now virglrenderer-android with virgl_test_server_android

It's great! I can now get chromium work smoothly through virglrender-android. But kwin and compiz crash all the time. It's probably a bug of virglrender because the same happens on my computer.

Hi @kde-yyds, I'm curious about how you made virglrenderer-android worked in termux. On my side I did :

* Install virglrenderer-android  and mesa with pkg install in termux

* build a mesa driver of the same version (23.0.3) inside the proot

But I've got an error when I use it in my proot with GALLIUM_DRIVER = virpipe.

I've also tried those commands : https://github.com/ThieuMinh26/Box4Droid but have the same error (when launching glmark2 eg.) : cso_unbind_context: assertionmaxsam <= pipe_max_samplers' failed.`

Would you be able to detail your setup and method (eg. how did you run chromium with acceleration) ?

I didn't build mesa by myself. The mesa package in both debian12 and archlinux support virpipe. I didn't do anything else. It just works.

pierreduf commented 1 year ago

OK thanks for your answer ! I finally managed to make it work by patching those assert and hardcoding "maxsam" and other values to their max possible values. It works great now :D !

I'm in an Ubuntu proot and 23.0.3 was not available hence the problem.