Well basically I followed Preparing mesa sources in
http://pkg-xorg.alioth.debian.org/howto/build-mesa.html:
- sudo apt-get install build-essential git
sudo apt-get build-dep mesa - git clone git://anongit.freedesktop.org/mesa/mesa (somewhere inside your home directory as a regular user, no need to be root)
- autoreconf -vfi
- Since I use Intel only I tripped off some stuff from the configure call and call configure as follows:
martin@merkaba:~/Spielen/Planeshift/spell-effects-slow/mesa.git> ./configure --prefix=/usr \
--enable-driglx-direct \
--enable-gles1 \
--enable-gles2 \
--enable-glx-tls \
--with-dri-driverdir=/usr/lib/dri \
--with-egl-platforms='drm x11' \
--with-dri-drivers=i965 \
--disable-gallium-llvm \
--with-gallium-drivers=""
- make -j4 (adapt to the number of your CPU cores, in recent kernels its not necessary to use twice that number)
- Then you have mesa ready to go in that directory, but Planeshift still uses the packaged mesa. So I just changed the Planeshift start script:
martin@merkaba:/opt/PlaneShift> cat pslaunch
#!/bin/bash
cd $(dirname $0)
# http://x.debian.net/howto/build-mesa.html
export LIBGL_DRIVERS_PATH=/home/martin/Spielen/Planeshift/spell-effects-slow/mesa.git/lib/
export LD_LIBRARY_PATH=/home/martin/Spielen/Planeshift/spell-effects-slow/mesa.git/lib/:libs/:$LD_LIBRARY_PATH
export EGL_DRIVERS_PATH==/home/martin/Spielen/Planeshift/spell-effects-slow/mesa.git/lib/
exec ./pslaunch.bin $@
Basically you need to adapt the path to what you chose to build Mesa in. Just add the "lib/" directory to that path. You can also first try it out without changing the start script, by just setting these environment variables in a shell and then start planeshift, but I think there may have been an issue with it, cause I AFAIR one of those variables is being set by the original pslaunch script already. Cannot check right now, cause I seem to have no original copy in there anymore. In any case, I suggest you to cp -p pslaunch pslaunsch-safe-original or so before editing the script.
This change to the script has survived the last updates. Does not seem to be touched often by PlaneShift developers, likely no reason to.
Well then start Planeshift as usual. If all went well, spell effects will be a *complete* difference for you
.
IĀ“d suggest a more generic location for
mesa.git directory inside your home directory. Cause you can use this not only for Planeshift. You can try other games with it as well.
In case you want to update your mesa against latest stuff, you can also use git pull together with the autoreconf, ./configure and make steps again.
In case of latest mesa you can also list all branches with
git branch -a and then select one by doing
git checkout -b localbranchaneme origin/remotebranchname
I always used latest mesa and it worked, but there may be times where latest mesa git is broken.
In case of problems, just ask. The good thing with this approach is: You do not break your desktop in case anything goes wrong, cause you donĀ“t replace mesa globally. Also building own mesa packages takes more time. I tried it initially and yes, I had issues some issues with my KDE compositing desktop using my own packages (for whatever reasons).
I go with this approach since I mentioned it here and it just works nicely
Ciao,