summaryrefslogtreecommitdiff
path: root/GalliumHowto.mdwn
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@freedesktop.org>2013-05-14 01:24:56 (GMT)
committerJoe Rayhawk <jrayhawk@freedesktop.org>2013-05-14 01:24:56 (GMT)
commit578b18b29f78b49701ae3d79399bbf7738f83456 (patch)
treeb51963330dddab3056f8f7c13d4da96e7513919a /GalliumHowto.mdwn
parentb05e98ea42e4ca198cbd829f3350168674e5bca5 (diff)
moin2mdwn: convert page GalliumHowto
Diffstat (limited to 'GalliumHowto.mdwn')
-rw-r--r--GalliumHowto.mdwn100
1 files changed, 100 insertions, 0 deletions
diff --git a/GalliumHowto.mdwn b/GalliumHowto.mdwn
new file mode 100644
index 0000000..627d470
--- /dev/null
+++ b/GalliumHowto.mdwn
@@ -0,0 +1,100 @@
+
+[[English|GalliumHowto]] / [[EspaƱol|ComoGallium]]
+
+Before following this guide, read [[MesaDrivers|MesaDrivers]] carefully, please.
+
+Consider not installing the driver in /usr/lib/dri, but using the LIBGL_DRIVERS_PATH environment variable each time you want to try an application with the Gallium 3D driver. If you really want to install the driver in /usr/lib/dri, you may want to disable AIGLX so that the X server itself doesn't use the driver. If you did neither and X fails to start or hangs up, delete /usr/lib/dri/nouveau_dri.so and try again.
+
+If you notice a regression, it is useful if you 'git bisect' the problem, find the commit which broke it and mail a report to the developer who committed the change. Usually, the regression will then be fixed on very short notice in the git tree.
+
+
+## Gallium3D and the X server
+
+Version 1.7 or higher of the Xorg server is required (with DRI2 enabled, which is the default).
+
+Maybe if you encounter issues like a black screen when running OpenGL apps, you can try to add
+[[!format txt """
+Section "ServerFlags"
+...
+Option "GlxVisuals" "all"
+...
+EndSection
+"""]]
+in xorg.conf.
+
+This tip was written long ago, and it is unclear whether it still helps or not.
+
+
+## Building Gallium3D's nouveau_dri.so
+
+([[Tips|UbuntuTips]] for Ubuntu users)
+
+If you have trouble compiling gallium's nouveau_dri.so, do not ask the nouveau developers for help, as we don't have the resources to answer such questions, and don't recommend its usage to ordinary users.
+
+Common compilation problems are often solved by making sure you have compiled and installed the lastest libdrm and by running "make clean" in the Mesa build directory. Also, sometimes the Mesa git doesn't compile due to temporary breakage: either wait a bit, update, and retry, or check whether a previous commit compiles and if so, git bisect and report the issue, ideally with a patch to fix it.
+
+Some pre-built nouveau packages for Linux or other OS distributions may include the nouveau gallium driver already. In this case, ask the makers of those if you have problems compiling or installing them.
+
+First, clone mesa git (this downloads quite some data and may take a while):
+[[!format txt """
+git clone git://anongit.freedesktop.org/git/mesa/mesa
+cd mesa/
+"""]]
+Be sure that your PKG_CONFIG_PATH is exported correctly (see [[InstallNouveau|InstallNouveau]]) in case you didn't install the libdrm it into the system itself. Then, run:
+[[!format txt """
+./autogen.sh --with-dri-drivers= --with-gallium-drivers=swrast,nouveau --enable-debug \
+ --enable-texture-float --disable-asm --enable-opengl --disable-gles2 --disable-openvg \
+ --enable-dri --enable-glx --enable-xvmc --disable-va --disable-vdpau --disable-osmesa \
+ --disable-egl --disable-xorg --disable-d3d1x --disable-xa --disable-gbm --disable-xlib-glx \
+ --disable-gallium-egl --disable-gallium-gbm --disable-gallium-llvm --disable-xcb \
+ --enable-driglx-direct --enable-glx-tls --enable-glu --enable-glw --disable-motif
+make
+"""]]
+(TODO: add a brief explanation about different config options needed for testing and debugging.)
+
+It's not recommended to install this library, but you can test if it works by setting LD_LIBRARY_PATH and LIBGL_DRIVERS_PATH to /path/to/mesa/lib. Here is an example with Openarena:
+[[!format txt """
+LD_LIBRARY_PATH="/path/to/mesa/lib" LIBGL_DRIVERS_PATH="/path/to/mesa/lib/gallium" openarena
+"""]]
+Note: you can put this line into .bashrc:
+[[!format txt """
+alias nvgl='LD_LIBRARY_PATH="/path/to/mesa/lib/" LIBGL_DRIVERS_PATH="/path/to/mesa/lib/gallium/"'
+"""]]
+and then run openarena with:
+[[!format txt """
+nvgl openarena
+"""]]
+To try out Gnome using with this driver, try putting this in your .gnomerc:
+[[!format txt """
+export LIBGL_DRIVERS_PATH="/path/to/mesa/lib/gallium"
+export LD_LIBRARY_PATH="/path/to/mesa/lib/"
+"""]]
+If your LD_LIBRARY_PATH is clobbered when you start your Gnome session, and you're feeling adventurous, you may try adding this line to the beginning of /etc/ld.so.conf (as root):
+[[!format txt """
+/path/to/mesa/lib
+"""]]
+Then you can run, as root:
+[[!format txt """
+ldconfig
+"""]]
+Warning: this adds a new path to the system-wide library path configuration. There are no guarantees that your computer won't turn into a three-eyed pixie.
+
+You may want sometimes to update your git repo :
+[[!format txt """
+git pull origin
+"""]]
+
+## Building a 32 bit mesa on a 64 bit system
+
+([[Tips|UbuntuTips]] for Ubuntu users)
+
+This should work:
+[[!format txt """
+CFLAGS="... -m32" CXXFLAGS="... -m32" ./configure \
+ --enable-gallium-nouveau \
+ --enable-32-bit \
+ --disable-asm
+"""]]
+Where "..." is meant to represent whatever optimization or debug flags you'd like. For debugging, don't forget -fno-omit-frame-pointer.
+
+You also need a 32 bit libdrm_nouveau.