Instructions for downloading, compiling, installing and testing the 3Dfx-accelerated X server. brian@precisioninsight.com Last updated 6 Mar 2000 Notes: I'm assuming you're using csh or tcsh. Replace setenv with export if using bash, etc. These instructions aren't absolute. There's a lot of freedom in how you may set things up on your computer. Let me know if you find problems with these instructions. 1. Make a directory for the CVS DRI sources: mkdir DRI cd DRI setenv ROOT `pwd` 2. Get the sources from CVS: setenv CVS_RSH ssh cvs -dNAME@cvs.dri.sourceforge.net:/cvsroot/dri co . Substitute your login for NAME. 3. Make a symbolic link: ln -s xc XFree39 4. Make the build directory tree: mkdir build cd build lndir -silent -ignorelinks ../XFree39 5. Check your host.def file: The default xc/config/cf/host.def file is: #define DefaultCCOptions -Wall #define DefaultGcc2i386Opt -O2 #define LibraryCDebugFlags -O2 #define BuildServersOnly YES #define XF86CardDrivers vga tdfx #define LinuxDistribution LinuxRedHat #define DefaultCCOptions -ansi GccWarningOptions -pipe #define BuildXF86DRI YES #define HasGlide YES /* Optionally turn these on for debugging */ /* #define GlxBuiltInTdfx YES */ /* #define DoLoadableServer NO */ #define SharedLibFont NO The default should work. You may want to define ProjectRoot to a clean directory if you want to do an install but not overwrite your existing/stock X installation. 6. Be sure that you have the glide 3 headers installed in /usr/include/glide3 7. Compile: cd $ROOT/build/xc make World >& World.LOG Examine the end of World.LOG to be sure it was successful. Grep for "***" to find errors. 8. Be sure the tdfx kernel module was build: find . -name tdfx.o If it wasn't built (it should have been) you can build it by hand: cd $ROOT/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel make -f Makefile.linux 9. Optionally, install the new X server. su cd $ROOT/build/xc make install >& install.LOG ldconfig exit 10. Load the tdfx kernel driver: su insmod $ROOT/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx.o Verify the kernel driver is installed with "lsmod". 11. Install the client-side GL libraries: su cp -d $ROOT/build/xc/lib/GL/libGL.so* /usr/local/lib ldconfig Make sure libglide3x.so is also in /usr/local/lib 12. Install the tdfx_dri.so driver: mkdir /usr/X11R6/lib/modules/dri cp $ROOT/build/xc/lib/GL/mesa/src/drv/tdfx/tdfx_dri.so /usr/X11R6/lib/modules/dri 13. Start X server Assuming you did _not_ install the new X server. The following script will bootstrap things. Put it in $ROOT/build/xc/programs/Xserver/ I call the script "go". -----begin go----------- #!/bin/sh ./XFree86 -xf86config XF86Config.tdfx &\ export DISPLAY=:0 fvwm & xterm -geometry +0+0 ----end go-------------- Run the script: ./go 14. Your X server should now be running. Verify GLX is available: xdpyinfo Look in the extensions list for the following: GLX SGI_GLX XFree86-DRI 15. Test an OpenGL demo program Find a copy of the gears demo, for example. Check that the libraries are found: ldd gears If the GL libs weren't found, you may need this: setenv LD_LIBRARY_PATH /usr/local/lib You should be linking with libGL.so.1 found in /usr/local/lib Disable vertical retrace syncing for best performance: setenv FX_GLIDE_SWAPINTERVAL 0 Run the demo: gears -info Verify that GL_RENDERER is "Mesa DRI Voodoo3 20000225" If you don't get the expected GL_RENDERER value, try setting the LIBGL_DEBUG env var before running: setenv LIBGL_DEBUG That may cause some error diagnostics to be printed.