xserver-xsdl icon indicating copy to clipboard operation
xserver-xsdl copied to clipboard

using llvm-pipe to get software glx renderer

Open zanfix opened this issue 4 years ago • 14 comments

Hi all, This is not an issue but a finding of mine.

To run applications in chroot env that require GLX renderer an option can be using llvm-pipe. This will provide a libGL.so library that uses software (CPU) instead of GPU to render graphics.

follow these pages to compile it your self:

https://www.mesa3d.org/download.html https://www.mesa3d.org/install.html https://www.mesa3d.org/llvmpipe.html

I am on debian stretch, i downloaded and compiled mesa version 13.0.6 and then installed package libtxc-dxtn-s2tc

glxinfo, glxdemo, glxgears and glxheads all work! glxgears reports ~200fps in small window, ~25fps in maximized window on my google pixel C

also, firefox will report a GPU in about:support page. I also managed to run blender! (seems slow but at least runs...) YMMV

use LD_LIBRARY_PATH to test your applications

zanfix avatar Mar 10 '20 23:03 zanfix

Nice find. If only there was a Debian package of it, built for arm64.

On Wed, 11 Mar 2020, 01:59 zanfix, [email protected] wrote:

Hi all, This is not an issue but a finding of mine.

To run applications in chroot env that require GLX renderer an option can be using llvm-pipe. This will provide a libGL.so library that uses software (CPU) instead of GPU to render graphics.

follow these pages to compile it your self:

https://www.mesa3d.org/download.html https://www.mesa3d.org/install.html https://www.mesa3d.org/llvmpipe.html

I am on debian stretch, i downloaded and compiled mesa version 13.0.6 and then installed package libtxc-dxtn-s2tc

glxinfo, glxdemo, glxgears and glxheads all work! glxgears reports ~200fps in small window, ~25fps in maximized window on my google pixel C

also, firefox will report a GPU in about:support page. I also managed to run blender! (seems slow but at least runs...) YMMV

use LD_LIBRARY_PATH to test your applications

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pelya/xserver-xsdl/issues/120?email_source=notifications&email_token=AABF5QDRIEVHBPVBWOWN6VTRG3H6FA5CNFSM4LFKI7EKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IUBXRGQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABF5QEM4JS5Q56DMPBBP63RG3H6FANCNFSM4LFKI7EA .

pelya avatar Mar 11 '20 00:03 pelya

Hey, I want to try to use LLVMPipe renderer under Arch Linux (proot) running in Termux container which is running in Android on Oculus Go (instant madness), how can I try to achvieve that?

Is there any Arch specific package for that?

memegauste avatar Apr 09 '20 20:04 memegauste

If you manage to build it yourself, please give us the recipe

On Thu, 9 Apr 2020, 23:17 Hoshi Yamazaki, [email protected] wrote:

Hey, I want to try to use LLVMPipe renderer under Arch Linux (proot) running in Termux container which is running in Android on Oculus Go (instant madness), how can I try to achvieve that?

Is there any Arch specific package for that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pelya/xserver-xsdl/issues/120#issuecomment-611732358, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABF5QES34IBQEVIAFEBT4LRLYUOBANCNFSM4LFKI7EA .

pelya avatar Apr 09 '20 20:04 pelya

Hey, I want to try to use LLVMPipe renderer under Arch Linux (proot) running in Termux container which is running in Android on Oculus Go (instant madness), how can I try to achvieve that?

Is there any Arch specific package for that?

Hi, At the end i compiled the library using mesa 19.3.5. From what i am understanding this version of the library should also include support for the ARM NEON extensions, opposed to 13.0.6 In fact I am getting double the framerate from glxgears opposed to my last comment: 430fps windowed, 42fps fullscreen

But do not get too exited about these figures... (as i was initially) It's actually very slow in real world scenarios, It all depends on your CPU power... I had to compile SDL2-2.0.12 from source (on debian, can not say for arch) for programs relying on sdl to even run, and in the end some still do not work and crash...

Just follow the 3 links i posted for compilation, testing and installation of the library

zanfix avatar Apr 09 '20 22:04 zanfix

Finally was successful however I did not see any boost compared to running VNC + tigervnc

nakele avatar Aug 05 '20 18:08 nakele

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

FreddyFeuerstein avatar Jan 21 '21 16:01 FreddyFeuerstein

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

nakele avatar Jan 21 '21 16:01 nakele

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

Could you explain more how this works?

zanfix avatar Jan 21 '21 16:01 zanfix

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

Could you explain more how this works?

ok... i suppose you are talking about issue #45

zanfix avatar Jan 21 '21 17:01 zanfix

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

Could you explain more how this works?

ok... i suppose you are talking about issue #45

They refer, in one of the posts about gl4es: is an oldish project: https://github.com/ptitSeb/gl4es

Compile and load with LD_LIBRARY_PATH

nakele avatar Jan 21 '21 19:01 nakele

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

Could you explain more how this works?

ok... i suppose you are talking about issue #45

They refer, in one of the posts about gl4es: is an oldish project: https://github.com/ptitSeb/gl4es

Compile and load with LD_LIBRARY_PATH

I compiled and tested a bit the gl4es library on my exynos samsung s9+ and i'm a little confused...

glxgears shows ˜240fps, instead of the standalone llvm-pipe library that shows ˜600fps, but without tearing

When testing some programs/games i'm actually getting mixed results... it seems that i'm getting better performance and less CPU usage with some games: something like 16-20 average framerate in quakespasm... and pcsxr seems to run games slightly better... One bonus is that with glxgears and quakespasm i do not get that weird thing that the background of the window is transparent... BUT firefox-esr will refuse to use the library at all and blender will simply show a black window a freeze. With the llvm-pipe standalone library openarena will at least open the main menu and crash at the moment of actually playing the game, with gl4es the game will not load at all...

I also noticed the debug string "LIBGL: Hardware vendor is VMware, Inc." so it appears to be using llvm-pipe anyway...

Oh well... I will try some more stuff... :+1:

zanfix avatar Jan 21 '21 23:01 zanfix

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

Could you explain more how this works?

ok... i suppose you are talking about issue #45

They refer, in one of the posts about gl4es: is an oldish project: https://github.com/ptitSeb/gl4es Compile and load with LD_LIBRARY_PATH

I compiled and tested a bit the gl4es library on my exynos samsung s9+ and i'm a little confused...

glxgears shows ˜240fps, instead of the standalone llvm-pipe library that shows ˜600fps, but without tearing

When testing some programs/games i'm actually getting mixed results... it seems that i'm getting better performance and less CPU usage with some games: something like 16-20 average framerate in quakespasm... and pcsxr seems to run games slightly better... One bonus is that with glxgears and quakespasm i do not get that weird thing that the background of the window is transparent... BUT firefox-esr will refuse to use the library at all and blender will simply show a black window a freeze. With the llvm-pipe standalone library openarena will at least open the main menu and crash at the moment of actually playing the game, with gl4es the game will not load at all...

I also noticed the debug string "LIBGL: Hardware vendor is VMware, Inc." so it appears to be using llvm-pipe anyway...

Oh well... I will try some more stuff... 👍

gl4es supports only OpenGL 2.1, I wouldn't trust glxgears "performance". I tried with trigger-rally and it worlks well. With other things it will crash.

nakele avatar Jan 22 '21 00:01 nakele

Finally was successful however I did not see any boost compared to running VNC + tigervnc

Only way to boost performance on my device was to simply switch from openbox to icewm as it does not use gl.

Some performance boost if using gl4es, however XSDL needs to run with the check for 24bit in thee video options.

Could you explain more how this works?

ok... i suppose you are talking about issue #45

They refer, in one of the posts about gl4es: is an oldish project: https://github.com/ptitSeb/gl4es Compile and load with LD_LIBRARY_PATH

I compiled and tested a bit the gl4es library on my exynos samsung s9+ and i'm a little confused... glxgears shows ˜240fps, instead of the standalone llvm-pipe library that shows ˜600fps, but without tearing When testing some programs/games i'm actually getting mixed results... it seems that i'm getting better performance and less CPU usage with some games: something like 16-20 average framerate in quakespasm... and pcsxr seems to run games slightly better... One bonus is that with glxgears and quakespasm i do not get that weird thing that the background of the window is transparent... BUT firefox-esr will refuse to use the library at all and blender will simply show a black window a freeze. With the llvm-pipe standalone library openarena will at least open the main menu and crash at the moment of actually playing the game, with gl4es the game will not load at all... I also noticed the debug string "LIBGL: Hardware vendor is VMware, Inc." so it appears to be using llvm-pipe anyway... Oh well... I will try some more stuff... +1

gl4es supports only OpenGL 2.1, I wouldn't trust glxgears "performance". I tried with trigger-rally and it worlks well. With other things it will crash.

yep...works fine in windowed mode :+1:

zanfix avatar Jan 22 '21 01:01 zanfix

But LLVMPipe should be in Debian try: LIBGL_ALWAYS_SOFTWARE=1 blender

IntinteDAO avatar Aug 03 '22 06:08 IntinteDAO