howto use software rendering for developing/debugging on linux

howto use software rendering for developing/debugging on linux

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

howto use software rendering for developing/debugging on linux

Post by abma »

mesa has a nice feature: it allows to enable pure software rendering by an environment variable (llvmpipe). to run spring with software rendering only, just run spring with this command:

Code: Select all

LIBGL_ALWAYS_SOFTWARE=1 ./spring
there are a lot of other env vars which can be used to configure behaviour. also driconf can be used to configure mesa.
http://www.mesa3d.org/envvars.html

Notes/Issues:

- (afaik) this only works with opensource (Mesa/Gallium) drivers!
- FSAALevel = 0 has to be set (else i got the error "Couldn't find matching GLX visual")
- SIGNAL_NANS=FALSE has to be set, else a SIGFPE happens in swrast_dri.so

this feature could be useful:
- to run automatic tests on servers
- debug / improve gfx (mesa drivers are imo the reference implementation of opengl)
- test shaders
- make spring run on computers without a gfx card
- create (reproduceable) screenshots on a headless computer
- ...

Code: Select all

Xvfb :5 -screen 0 1024x768x24 &
DISPLAY=:5 ./spring
a screenshot can be made this way:

Code: Select all

xwd -display :5 -root -out image.xwd
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: howto use software rendering for developing/debugging on linux

Post by Anarchid »

Thanks! Now i can into texture2 on shitty intels!
Post Reply

Return to “Engine”