diff options
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp | 181 |
1 files changed, 133 insertions, 48 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp b/xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp index 66c216950..e2f847291 100644 --- a/xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp +++ b/xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp @@ -2,13 +2,13 @@ VA Linux Systems, Inc. Professional Services - Graphics. - 29 October 2000 + 5 January 2001 1. Preamble 1.1 Copyright -Copyright © 2000 by VA Linux Systems, Inc. All Rights Reserved. +Copyright 2000 by VA Linux Systems, Inc. All Rights Reserved. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all @@ -24,12 +24,14 @@ Intel is a registered trademark of Intel Corporation. 3Dlabs, GLINT, and Oxygen are either registered trademarks or trademarks of 3Dlabs Inc. Ltd. 3dfx, Voodoo3, Voodoo4, and Voodoo5 are registered trademarks of 3dfx Inter- active, Incorporated. Matrox is a registered trademark of Matrox Electronic -Systems Ltd. ATI Rage is a registered trademark of ATI Technologies, Inc. -All other trademarks mentioned are the property of their respective owners. +Systems Ltd. ATI Rage and Radeon is a registered trademark of ATI Technolo- +gies, Inc. All other trademarks mentioned are the property of their respec- +tive owners. 2. Introduction This document describes how to download, compile and install the DRI project. +The DRI provides 3D graphics hardware acceleration for the XFree86 project. This information is intended for experienced Linux developers. Beginners are probably better off installing precompiled packages. @@ -40,11 +42,8 @@ inux.com. You'll need the following: - o At least 400MB of free disk space. More is needed if you want to build - with debugging information or keep several build trees. - - o A fast system. Using a PIII-550 it takes about 1/2 hour to build every- - thing. + o At least 200MB of free disk space. If you compile for debugging (the -g + option) then you'll need about 600MB. o GCC compiler and related tools. @@ -55,9 +54,12 @@ You'll need the following: o FreeBSD support is not currently being maintained and may not work. +The DRI 3D drivers generally work on systems with Intel or AMD CPUs. How- +ever, there is limited support for Alpha and Sparc. + For 3dfx Voodoo3 hardware, you'll also need: - o Glide3x headers and runtime library if you want to use the 3dfx driver. + o Glide3 headers and runtime library if you want to use the 3dfx driver. These can be obtained from linux.3dfx.com. o A recent Linux 2.4.x kernel. AGP support is not required. @@ -70,20 +72,23 @@ For Intel i810 hardware, you'll also need: o A recent Linux 2.4.x kernel with AGP support. -For ATI Rage hardware, you'll also need: +For ATI Rage 128 and Radeon hardware, you'll also need: o A recent Linux 2.4.x kernel with AGP support. 4. Linux Kernel Preparation The DRI project closely tracks Linux kernel development. Since the internal -Linux data structures change frequently in the 2.4 development branch it's -important to have use the most recent Linux kernel. As of this writing (Nov -2000), 2.4.0-test11-pre5 is the most recent version of Linux which the DRI is -synchronized to. +Linux data structures might change in the 2.4 Linux kernel, it's important to +have use the most recent Linux kernel. As of this writing (Jan 2001), 2.4.0 +is the most recent version of Linux which the DRI is synchronized to. Most of the DRI drivers require AGP support and using Intel Pentium III SSE -optimizations also requires an up-to-date Linux kernel. +optimizations also requires an up-to-date Linux kernel. Configuring your +kernel correctly is very important, as features such as SSE optimizations +will be disabled if your kernel does not support them. Thus, if you have a +Pentium III processor, you must configure your kernel for the Pentium III +processor family. Building a new Linux kernel can be difficult for beginners but there are resources on the Internet to help. This document assumes experience with @@ -102,6 +107,17 @@ Here are the basic steps for kernel setup. ln -s linux-2.4.x linux bzcat linux-2.4.x.tar.bz2 | tar xf - + It is critical that /usr/src/linux point to your new kernel sources, + otherwise the kernel headers will not be used when building the DRI. + This will almost certainly cause compilation problems. + + o Read /usr/src/linux/Documentation/Changes. This file lists the minimum + requirements for all software packages required to build the kernel. + You must upgrage at least gcc, make, binutils and modutils to at least + the versions specified in this file. The other packages may not be + needed. If you are upgrading from Linux 2.2.x you must upgrade your + modutils package for Linux 2.4.x. + o Configure your kernel. You might, for example, use make menuconfig and do the following: @@ -111,6 +127,12 @@ Here are the basic steps for kernel setup. o hit ESC to return to the top-level menu + o Go to Processor type and features + + o Select your processor type from Processor Family + + o hit ESC to return to the top-level menu + o Go to Character devices o Disable Direct Rendering Manager (XFree86 DRI support) since we'll @@ -153,12 +175,59 @@ Here are the basic steps for kernel setup. Note that last make command will automatically run lilo for you. - o Upgrade your modutils package for Linux 2.4.x if you're upgrading from - Linux 2.2.x. - o Now reboot to use the new kernel. -5. Downloading the XFree86/DRI CVS Sources +5. CPU Architectures + +In general, nothing special has to be done to use the DRI on different CPU +architectures. There are, however, a few optimizations that are CPU-depen- +dent. Mesa will determine at runtime which CPU-dependent optimizations +should be used and enable them where appropriate. + +5.1 Intel Pentium III Features + + " + +The Pentium III SSE (Katmai) instructions are used in optimized vertex trans- +formation functions in the Mesa-based DRI drivers. On Linux, SSE requires a +recent kernel (such as 2.4.0-test11 or later) both at compile time and run- +time. + +5.2 AMD 3DNow! Features + + " + +AMD's 3DNow! instructions are used in optimized vertex transformation func- +tions in the Mesa-based DRI drivers. 3DNow! is supported in most versions of +Linux. + +5.3 Alpha Features + + " + +On newer Alpha processors a significant performance increase can be seen with +the addition of the -mcpu= option to GCC. This option is dependent on the +architecture of the processor. For example, -mcpu=ev6 will build specifi- +cally for the EV6 based AXP's, giving both byte and word alignment access to +the DRI/Mesa drivers. + +To enable this optimization edit your xc/config/host.def file and add the +line: + +#define DefaultCCOptions -ansi GccWarningOptions -pipe -mcpu=ev6 + +Additional speed improvements to 3D rendering can be achieved by installing +Compaq's Math Libraries (CPML) which can be obtained from http://www.sup- +port.compaq.com/alpha-tools/software/index.html + +Once installed, you can add this line to your host.def to build with the CPML +libraries: + +#define UseCompaqMathLibrary YES + +The host.def file is explained below. + +6. Downloading the XFree86/DRI CVS Sources The DRI project is hosted by VA Linux Systems' SourceForge. The DRI source code, which is a subset of the XFree86 source tree, is kept in a CVS reposi- @@ -169,7 +238,7 @@ SourceForge user. It's recommended that you become a registered SourceForge user so that you may submit non-anonymous bug reports and can participate in the mailing lists. -5.1 Anonymous CVS download: +6.1 Anonymous CVS download: 1. Create a directory to store the CVS files: @@ -189,7 +258,7 @@ the mailing lists. The -z3 flag causes compression to be used in order to reduce the down- load time. -5.2 Registered CVS download: +6.2 Registered CVS download: 1. Create a directory to store the CVS files: @@ -215,7 +284,7 @@ the mailing lists. The -z3 flag causes compression to be used in order to reduce the down- load time. -5.3 Updating your CVS sources +6.3 Updating your CVS sources In the future you'll want to occasionally update your local copy of the DRI source code to get the latest changes. This can be done with: @@ -226,7 +295,7 @@ source code to get the latest changes. This can be done with: The -d flag causes any new subdirectories to be created and -A causes most recent trunk sources to be fetched, not branch sources. -6. Mesa +7. Mesa Most of the DRI 3D drivers are based on Mesa (the free implementation of the OpenGL API). The relevant files from Mesa are already included in the @@ -239,9 +308,9 @@ ward. It can be an error-prone undertaking, especially for beginners, and is not generally recommended. The DRI developers will upgrade Mesa when appro- priate. -7. Compiling the XFree86/DRI tree +8. Compiling the XFree86/DRI tree -7.1 Make a build tree +8.1 Make a build tree Rather than placing object files and library files right in the source tree, they're instead put into a parallel build tree. The build tree is made with @@ -259,7 +328,7 @@ the CVS source tree. Advanced users may have several build trees for compiling and testing with different options. -7.2 Edit the host.def file +8.2 Edit the host.def file The ~/DRI-CVS/build/xc/config/cf/host.def file is used to configure the XFree86 build process. You can change it to customize your build options or @@ -272,7 +341,7 @@ The default host.def file will look something like this: (Alpha) #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 (or similar) #define LibraryCDebugFlags -O2 #define BuildServersOnly YES - #define XF86CardDrivers vga tdfx mga r128 i810 + #define XF86CardDrivers vga tdfx mga ati i810 #define LinuxDistribution LinuxRedHat #define DefaultCCOptions -ansi GccWarningOptions -pipe #define BuildXF86DRI YES @@ -281,6 +350,7 @@ The default host.def file will look something like this: /* #define GlxBuiltInTdfx YES */ /* #define GlxBuiltInMga YES */ /* #define GlxBuiltInR128 YES */ + /* #define GlxBuiltInRadeon YES */ /* #define DoLoadableServer NO */ #define SharedLibFont NO @@ -294,11 +364,26 @@ Especially note the XF86CardDrivers line to be sure your driver is listed. If you have 3dfx hardware be sure that the Glide 3x headers are installed in /usr/include/glide3/ and that the Glide 3x library is installed at -/usr/lib/libglide3x.so. +/usr/lib/libglide3.so. If you do not have 3dfx hardware comment out the HasGlide3 line in host.def. -7.3 Compilation +If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you +should add the following: + + #define MesaUse3DNow YES + +If you want to enable SSE optimizations in Mesa and the DRI drivers, you must +upgrade to a Linux 2.4.x kernel. Mesa will verify that SSE is supported by +both your processor and your operating system, but to build Mesa inside the +DRI you need to have the Linux 2.4.x kernel headers in /usr/src/linux. If +you enable SSE optimizations with an earlier version of the Linux kernel in +/usr/src/linux, Mesa will not compile. You have been warned. If you do have +a 2.4.x kernel, you should add the following: + + #define MesaUseKatmai YES + +8.3 Compilation To compile the complete DRI tree: @@ -320,7 +405,7 @@ slashdot. WARNING: do not use the -j option with make. It's reported that it does not work with XFree86/DRI. -7.4 Check for compilation errors +8.4 Check for compilation errors Using your text editor, examine World.LOG for errors by searching for the pattern ***. @@ -331,8 +416,8 @@ Verify that the DRI kernel module(s) for your system were built: ls For the 3dfx Voodoo, you should see tdfx.o. For the Matrox G200/G400, you -should see mga.o. For the ATI Rage 128, you should see r128.o. For the -Intel i810, you should see i810.o. +should see mga.o. For the ATI Rage 128, you should see r128.o. For the ATI +Radeon, you should see radeon.o. For the Intel i810, you should see i810.o. If the DRI kernel module(s) failed to build you should verify that you're using the right version of the Linux kernel. The most recent kernels are not @@ -352,7 +437,7 @@ After fixing the errors, run make World again. Later, you might just compile parts of the source tree but it's important that the whole tree will build first. -7.5 DRI kernel module installation +8.5 DRI kernel module installation The DRI kernel modules are in ~/DRI-CVS/build/xc/pro- grams/Xserver/hw/xfree86/os-support/linux/drm/kernel/. @@ -364,7 +449,7 @@ ules/2.4.x/kernel/driver/char/drm/ then run depmod and restart your X server. Make sure you first unload any older DRI kernel modules that might be already loaded. -8. Normal Installation and Configuration +9. Normal Installation and Configuration Most users will want to install the new X server and use it instead of the original X server. This section explains how to do that. We assume that the @@ -374,7 +459,7 @@ Developers, on the other hand, may just want to test the X server without actually installing it as their default server. If you want to do that, skip to the next section. -8.1 X Installation +9.1 X Installation You'll need to run as root to do the following commands: @@ -388,7 +473,7 @@ already exist, then run the install commands: cd ~/DRI-CVS/build/xc make install -8.2 Linker configuration +9.2 Linker configuration Edit your /etc/ld.so.conf file and put /usr/X11R6-DRI/lib as the first line. Then run: @@ -397,7 +482,7 @@ Then run: This will ensure that you use the new X libraries when you run X programs. -8.3 Update Locale Information +9.3 Update Locale Information To update your X locale information do the following: @@ -409,7 +494,7 @@ To update your X locale information do the following: This will prevent a locale error message from being printed when you run Xlib programs. -8.4 Setup Miscellaneous Files +9.4 Setup Miscellaneous Files Issue the following commands: @@ -421,7 +506,7 @@ Issue the following commands: This will allow applications to use the fonts and resources that they used in the past. -8.5 Disable the Old X Server and Enable the New One +9.5 Disable the Old X Server and Enable the New One Assuming that an installation of XFree86 3.3.x is present, we need to disable the old 3.3.x X server and enable the new 4.0.x X server. @@ -435,7 +520,7 @@ Issue the following commands: This will cause the new X server to be used instead of the original one. -8.6 Create the XF86Config File +9.6 Create the XF86Config File Configuration files for XFree86 3.3.x will not work with XFree86 4.0.x. @@ -460,20 +545,20 @@ fig-4. This configuration file will be recognized by the 4.0.x server but not by 3.3.x servers. You can instead name it /etc/X11/XF86Config but that'll overwrite your old config file, which you may want to preserve. -8.7 Start the New X Server +9.7 Start the New X Server The new X server should be ready to use now. Start your X server in your usual manner. Typically, the startx command is used: startx -9. Testing the Server Without Installing It +10. Testing the Server Without Installing It As mentioned at the start of section 8, developers may want to simply run the X server without installing it. This can save some time and allow you to keep a number of X servers available for testing. -9.1 Configuration +10.1 Configuration As described in the preceding section, you'll need to create a configuration file for the new server. Put the XF86Config file in your ~/DRI- @@ -481,7 +566,7 @@ CVS/build/xc/programs/Xserver directory. Be sure the ModulePath option is set correctly. -9.2 A Startup Script +10.2 A Startup Script A simple shell script can be used to start the X server. Here's an example. @@ -508,13 +593,13 @@ server in a file. If you're using the C-shell: ./start-dri >& log -10. Where To Go From Here +11. Where To Go From Here At this point your X server should be up and running with hardware-acceler- ated direct rendering. Please read the DRI User Guide for information about trouble shooting and how to use the DRI-enabled X server for 3D applications. - Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.9 2000/12/12 17:48:10 alanh Exp $ + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.10 2001/01/08 01:07:34 martin Exp $ -$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp,v 3.6 2000/12/12 19:04:02 dawes Exp $ +$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp,v 3.7 2001/01/21 21:19:14 tsi Exp $ |