/[gentoo]/xml/htdocs/doc/en/dri-howto.xml
Gentoo

Diff of /xml/htdocs/doc/en/dri-howto.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.14 Revision 1.15
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.14 2004/06/21 16:41:48 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.15 2004/08/01 10:25:10 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/dri-howto.xml"> 5<guide link="/doc/en/dri-howto.xml">
6<title>Hardware 3D Acceleration Guide</title> 6<title>Hardware 3D Acceleration Guide</title>
7<author title="Author"> 7<author title="Author">
16with XFree86 in Gentoo Linux. 16with XFree86 in Gentoo Linux.
17</abstract> 17</abstract>
18 18
19<license/> 19<license/>
20 20
21<version>1.0.3</version> 21<version>1.0.4</version>
22<date>June 21st, 2004</date> 22<date>August 01, 2004</date>
23 23
24<chapter> 24<chapter>
25<title>Introduction</title> 25<title>Introduction</title>
26<section> 26<section>
27<title>What is hardware 3D acceleration and why do I want it?</title> 27<title>What is hardware 3D acceleration and why do I want it?</title>
271 271
272<warn> 272<warn>
273Don't do this if the package worked. 273Don't do this if the package worked.
274</warn> 274</warn>
275 275
276<note>
277By their nature, CVS sources are always changing. Your configuration may not
278look exactly like the one below.
279</note>
280
281</body> 276</body>
282</section> 277</section>
283<section> 278<section>
284<title>Do you need the CVS?</title> 279<title>Do you need the CVS?</title>
285<body> 280<body>
301Check the DRI <uri 296Check the DRI <uri
302link="http://dri.sourceforge.net/cgi-bin/moin.cgi/Status">supported cards 297link="http://dri.sourceforge.net/cgi-bin/moin.cgi/Status">supported cards
303list</uri> to see if the CVS supports your card. Even if it doesn't, but it 298list</uri> to see if the CVS supports your card. Even if it doesn't, but it
304supports a similar card, try it. 299supports a similar card, try it.
305</p> 300</p>
301
302<!-- I see a couple of 8x AGP stuff on the Internet about vanilla 2.4 kernels;
303 is this now available or not? I've commented it out for the time being,
304 hoping that this doesn't affect us :)
306 305
307<warn> 306<warn>
308"Linux 2.4 doesn't support agp 8x, so I had to go find a backport. The backport 307"Linux 2.4 doesn't support agp 8x, so I had to go find a backport. The backport
309works .... it doesn't patch quite properly, and it requires 2.4.21 (I've only 308works .... it doesn't patch quite properly, and it requires 2.4.21 (I've only
310gotten it to work with vanilla, straight from the tarball (not ebuild)). First 309gotten it to work with vanilla, straight from the tarball (not ebuild)). First
311go get the 2.4.20-2.4.21 patch from kernel.org .... (then get the patch,) It 310go get the 2.4.20-2.4.21 patch from kernel.org .... (then get the patch,) It
312was on a mailing list somewhere. It doesn't patch cleanly -- one file fails, 311was on a mailing list somewhere. It doesn't patch cleanly - - one file fails,
313the pci_ids.h file, but if you actually read the file and the reject list, it's 312the pci_ids.h file, but if you actually read the file and the reject list, it's
314very easy to fix. But it does load, and it gives me 1600x1200 with video 313very easy to fix. But it does load, and it gives me 1600x1200 with video
315(although a bit slow b/c of lack of dga) with xfree-drm." (SanityInAnarchy on 314(although a bit slow b/c of lack of dga) with xfree-drm." (SanityInAnarchy on
316#gentoo) 315#gentoo)
317</warn> 316</warn>
320The patch is a little tricky to work with but <uri 319The patch is a little tricky to work with but <uri
321link="http://www.ussg.iu.edu/hypermail/linux/kernel/0302.2/att-1618/01-agp3.diff.bz2">here's 320link="http://www.ussg.iu.edu/hypermail/linux/kernel/0302.2/att-1618/01-agp3.diff.bz2">here's
322the link</uri>. If you can disable 8X AGP in your BIOS, change it to 4X and you 321the link</uri>. If you can disable 8X AGP in your BIOS, change it to 4X and you
323may not need the patch. 322may not need the patch.
324</impo> 323</impo>
324-->
325 325
326</body> 326</body>
327</section>
328<section> 327</section>
329<title>Install the CVS sources</title>
330<body>
331
332<p>
333Follow this guide through "Compile and install your kernel." Then continue with
334this guide, which tracks step 6 of the <uri
335link="http://dri.sourceforge.net/cgi-bin/moin.cgi/Building">DRI compilation
336guide</uri> and follows it through step 8.3.
337</p>
338
339</body>
340</section> 328<section>
341<section> 329<title>Follow the CVS Instructions</title>
342<title>Anonymous CVS download</title>
343<body>
344
345<p>
346Create a directory to store the CVS files:
347</p>
348
349<pre caption="Create a directory for CVS">
350# <i>cd ~</i>
351# <i>mkdir DRI-CVS</i>
352</pre>
353
354<p>
355Check out the CVS sources:
356</p>
357
358<pre caption="Check out CVS sources">
359# <i>cd ~/DRI-CVS</i>
360# <i>cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login</i>
361<codenote>(hit ENTER when prompted for a password)</codenote>
362# <i>cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc</i>
363<codenote>The -z3 flag causes compression to be used to reduce the download time.</codenote>
364</pre>
365
366</body> 330<body>
367</section>
368<section>
369<title>Updating your CVS sources</title>
370<body>
371 331
372<p>
373In the future you'll want to occasionally update your local copy of the DRI
374source code to get the latest changes. This can be done with:
375</p> 332<p>
376 333The DRI project has a document about CVS compiling themselves. Please read <uri
377<pre caption="Update local copy"> 334link="http://dri.sourceforge.net/cgi-bin/moin.cgi/Building">the document</uri>
378# <i>cd ~/DRI-CVS</i> 335and follow the instructions up to the <e>Installing for XFree86</e> or
379# <i>cvs -z3 update -dA xc</i> 336<e>Installing for X.org</e> part.
380<codenote>The -d flag causes any new subdirectories to be created.</codenote>
381<codenote>The -A flag causes most recent trunk sources to be fetched, not branch sources.</codenote>
382</pre>
383
384</body>
385</section>
386<section>
387<title>Make a build tree</title>
388<body>
389
390<p>
391Rather than placing object files and library files right in the source tree,
392they're instead put into a parallel <e>build</e> tree. The build tree is made
393with the <c>lndir</c> command:
394</p>
395
396<pre caption="Creating a parallel build tree">
397# <i>cd ~/DRI-CVS</i>
398# <i>ln -s xc XFree40</i>
399# <i>mkdir build; cd build</i>
400# <i>lndir -silent -ignorelinks ../XFree40</i>
401</pre>
402
403<p>
404The build tree will be populated with symbolic links which point back into the
405CVS source tree. Advanced users may have several build trees for compiling and
406testing with different options.
407</p>
408
409</body>
410</section>
411<section>
412<title>Edit the host.def file</title>
413<body>
414
415<p>
416The <path>~/DRI-CVS/build/xc/config/cf/host.def</path> file is used to
417configure the XFree86 build process. You can change it to customize your build
418options or make adjustments for your particular system configuration. The
419default host.def file will look something like this:
420</p>
421
422<pre caption="host.def">
423#define DefaultCCOptions -Wall
424<codenote>For i386:</codenote>
425#define DefaultGcc2i386Opt -O2
426<codenote>For Alpha:</codenote>
427#define DefaultGcc2AxpOpt -O2 -mcpu=ev6 (or similar)
428<codenote>For all architectures</codenote>
429#define LibraryCDebugFlags -O2
430#define BuildServersOnly YES
431#define XF86CardDrivers vga tdfx mga ati i810
432#define LinuxDistribution LinuxRedHat
433#define DefaultCCOptions -ansi GccWarningOptions -pipe
434#define BuildXF86DRI YES
435/* Optionally turn these on for debugging */
436/* #define GlxBuiltInTdfx YES */
437/* #define GlxBuiltInMga YES */
438/* #define GlxBuiltInR128 YES */
439/* #define GlxBuiltInRadeon YES */
440/* #define DoLoadableServer NO */
441#define SharedLibFont NO
442</pre>
443
444<pre caption="host.def continued">
445<codenote>Note the XF86CardDrivers line to be sure your card's driver is listed.</codenote>
446<codenote>If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you should add the following:</codenote>
447#define MesaUse3DNow YES
448<codenote>You don't have to be using an AMD processor to enable this option.</codenote>
449<codenote>The DRI will look for 3DNow! support at runtime and only enable it if applicable.</codenote>
450</pre>
451
452<p>
453If you want to enable SSE optimizations in Mesa and the DRI drivers, you must
454upgrade to a Linux 2.4.x kernel. Mesa will verify that SSE is supported by both
455your processor and your operating system, but to build Mesa inside the DRI you
456need to have the Linux 2.4.x kernel headers in <path>/usr/src/linux</path>. If
457you enable SSE optimizations with an earlier version of the Linux kernel in
458<path>/usr/src/linux</path>, Mesa will not compile. You have been warned. If
459you do have a 2.4.x kernel, you should add the following:
460</p>
461
462<pre caption="Update on host.def">
463#define MesaUseKatmai YES
464</pre>
465
466</body>
467</section>
468<section>
469<title>Compile the XFree86/DRI tree</title>
470<body>
471
472<p>
473To compile the complete DRI tree:
474</p>
475
476<pre caption="Compile the DRI tree">
477# <i>cd ~/DRI-CVS/build/xc/</i>
478# <i>make World &gt;&amp; world.log</i>
479</pre>
480
481<p>
482It may also be necessary to do the following, depending on what you placed in
483host.def:
484</p>
485
486<pre caption="Further compiling steps">
487# <i>cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel</i>
488# <i>make -f Makefile.linux radeon.o</i>
489<codenote>Replace radeon with your driver.</codenote>
490</pre>
491
492<p>
493With the default compilation flags it's normal to get a lot of warnings during
494compilation. Building will take some time so you may want to go check your
495email or visit slashdot.
496</p>
497
498<warn>
499Do not use the -j option with make (i.e., do not use distcc). It's reported that
500it does not work with XFree86/DRI.
501</warn>
502
503<p>
504Using your text editor, examine world.log for errors by searching for the
505pattern ***.
506</p> 337</p>
507 338
508</body> 339</body>
509</section> 340</section>
510<section> 341<section>
528using the right version of the Linux kernel. The most recent kernels are not 359using the right version of the Linux kernel. The most recent kernels are not
529always supported. 360always supported.
530</p> 361</p>
531 362
532<p> 363<p>
533Install over your XFree86 installation. You may wish to back up xfree. 364Install over your XFree86 or X.org installation. You may wish to back up xfree
365or xorg-x11.
534</p> 366</p>
535 367
536<pre caption="Backing up XFree"> 368<pre caption="Backing up XFree">
537# <i>quickpkg xfree</i> 369# <i>quickpkg xfree</i>
538<codenote>This backs up your XFree86 package.</codenote> 370<codenote>This backs up your XFree86 package.</codenote>

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20