/[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.16 Revision 1.17
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.16 2004/08/07 13:44:12 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/dri-howto.xml,v 1.17 2004/12/26 14:32:07 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">
10<author title="Editor"> 10<author title="Editor">
11<mail link="peesh@gentoo.org">Jorge Paulo</mail> 11<mail link="peesh@gentoo.org">Jorge Paulo</mail>
12</author> 12</author>
13 13
14<abstract> 14<abstract>
15This document is a guide to getting 3D acceleration working using XFree-DRM 15This document is a guide to getting 3D acceleration working using X11-DRM
16with XFree86 in Gentoo Linux. 16with Xorg in Gentoo Linux.
17</abstract> 17</abstract>
18 18
19<license/> 19<license/>
20 20
21<version>1.0.5</version> 21<version>1.0.6</version>
22<date>August 07, 2004</date> 22<date>2004-12-26</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>
31With hardware 3D acceleration, three-dimensional rendering uses the graphics 31With hardware 3D acceleration, three-dimensional rendering uses the graphics
32processor on your video card instead of taking up valuable CPU resources 32processor on your video card instead of taking up valuable CPU resources
33drawing 3D images. It's also referred to as "hardware acceleration" instead of 33drawing 3D images. It's also referred to as "hardware acceleration" instead of
34"software acceleration" because without this 3D acceleration your CPU is forced 34"software acceleration" because without this 3D acceleration your CPU is forced
35to draw everything itself using the Mesa software rendering libraries, which 35to draw everything itself using the Mesa software rendering libraries, which
36takes up quite a bit of processing power. While XFree86 typically supports 2D 36takes up quite a bit of processing power. While Xorg typically supports 2D
37hardware acceleration, it often lacks hardware 3D acceleration. 37hardware acceleration, it often lacks hardware 3D acceleration.
38Three-dimensional hardware acceleration is valuable in situations requiring 38Three-dimensional hardware acceleration is valuable in situations requiring
39rendering of 3D objects such as games, 3D CAD and modeling. 39rendering of 3D objects such as games, 3D CAD and modeling.
40</p> 40</p>
41 41
72</p> 72</p>
73 73
74</body> 74</body>
75</section> 75</section>
76<section> 76<section>
77<title>What is XFree-DRM and how does it relate to regular XFree86?</title> 77<title>What is X11-DRM and how does it relate to regular Xorg?</title>
78<body> 78<body>
79 79
80<p> 80<p>
81XFree-DRM is an <e>enhancement</e> to XFree86 that adds 3D acceleration for 81X11-DRM is an <e>enhancement</e> to Xorg that adds 3D acceleration for
82cards by adding the kernel module necessary for direct rendering. 82cards by adding the kernel module necessary for direct rendering.
83</p> 83</p>
84 84
85</body> 85</body>
86</section> 86</section>
88<title>Purpose</title> 88<title>Purpose</title>
89<body> 89<body>
90 90
91<p> 91<p>
92This guide is for people who can't get direct rendering working with just 92This guide is for people who can't get direct rendering working with just
93XFree. XFree-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64 93Xorg. X11-DRM works for 3dfx, gamma, i8x0, matrox, rage128, radeon, mach64
94(as of xfree-drm-4.3.0-r7) and sis300 series drivers. Since the 2.4 kernels' 94and sis300 series drivers. See the <uri
95Direct Rendering Manager (DRM) doesn't support XFree 4.3, the xfree-drm package
96is needed. If you're using a 2.6 kernel, its DRM supports XFree 4.3; Gentoo's
97XFree-DRM package is not yet working on 2.6 kernels. See the <uri
98link="http://dri.sourceforge.net">DRI homepage</uri> for more info and 95link="http://dri.sourceforge.net">DRI homepage</uri> for more info and
99documentation. 96documentation.
100</p> 97</p>
101 98
102</body> 99</body>
113</body> 110</body>
114</section> 111</section>
115</chapter> 112</chapter>
116 113
117<chapter> 114<chapter>
118<title>Install XFree86 and configure your kernel</title> 115<title>Install Xorg and configure your kernel</title>
119<section> 116<section>
120<title>Install XFree86</title> 117<title>Install Xorg</title>
121<body> 118<body>
122 119
123<pre caption="Installing XFree86"> 120<p>
124# <i>emerge x11-base/xfree</i> 121Please read our <uri link="/doc/en/xorg-config.xml">Xorg Configuration
122Guide</uri> to get Xorg up and running.
125</pre> 123</p>
126 124
127</body> 125</body>
128</section> 126</section>
129<section> 127<section>
130<title>Configure your kernel</title> 128<title>Configure your kernel</title>
169<codenote>Enable your chipset instead of the above.</codenote> 167<codenote>Enable your chipset instead of the above.</codenote>
170[ ] Direct Rendering Manager (XFree86 DRI support) 168[ ] Direct Rendering Manager (XFree86 DRI support)
171</pre> 169</pre>
172 170
173<p> 171<p>
174Make sure the Direct Rendering Manager (DRM) is <e>off</e>. The XFree-DRM 172Make sure the Direct Rendering Manager (DRM) is <e>off</e>. The X11-DRM
175package will provide its own. The 2.4 kernel's version is for XFree 4.2. 173package will provide its own.
176</p> 174</p>
177 175
178</body> 176</body>
179</section> 177</section>
180<section> 178<section>
196</body> 194</body>
197</section> 195</section>
198</chapter> 196</chapter>
199 197
200<chapter> 198<chapter>
201<title>Install XFree-DRM and configure direct rendering</title> 199<title>Install X11-DRM and configure direct rendering</title>
202<section>
203<title>Install XFree-DRM</title>
204<body>
205
206<pre caption="Installing XFree-DRM">
207# <i>ACCEPT_KEYWORDS="~x86" emerge xfree-drm</i>
208</pre>
209
210</body>
211</section> 200<section>
201<title>Install X11-DRM</title>
202<body>
203
204<pre caption="Installing X11-DRM">
205# <i>ACCEPT_KEYWORDS="~x86" emerge x11-drm</i>
206</pre>
207
208</body>
212<section> 209</section>
210<section>
213<title>Configure XF86Config</title> 211<title>Configure Xorg.conf</title>
214<body> 212<body>
215 213
216<p> 214<p>
217Open <path>/etc/X11/XF86Config</path> with your favorite text editor and edit 215Open <path>/etc/X11/xorg.conf</path> with your favorite text editor and edit
218it to enable DRI and GLX. 216it to enable DRI and GLX.
219</p> 217</p>
220 218
221<pre caption="XF86Config"> 219<pre caption="xorg.conf">
222... 220...
223Section "Module" 221Section "Module"
224 Load "dri" 222 Load "dri"
225 Load "glx" 223 Load "glx"
226 ... 224 ...
262# <i>glxinfo | grep rendering</i> 260# <i>glxinfo | grep rendering</i>
263direct rendering: Yes 261direct rendering: Yes
264<codenote>If it says "No," you don't have 3D acceleration.</codenote> 262<codenote>If it says "No," you don't have 3D acceleration.</codenote>
265# <i>glxgears</i> 263# <i>glxgears</i>
266<codenote>Test your frames per second (FPS) at the default size. The number should be </codenote> 264<codenote>Test your frames per second (FPS) at the default size. The number should be </codenote>
267<codenote>significantly higher than before installing xfree-drm. Do this while the CPU is as idle as possible.</codenote> 265<codenote>significantly higher than before installing x11-drm. Do this while the CPU is as idle as possible.</codenote>
268</pre> 266</pre>
269 267
270</body> 268</body>
271</section> 269</section>
272</chapter> 270</chapter>
285<section> 283<section>
286<title>Do you need the CVS?</title> 284<title>Do you need the CVS?</title>
287<body> 285<body>
288 286
289<p> 287<p>
290First you have to check whether the xfree-drm package works. If it doesn't and 288First you have to check whether the x11-drm package works. If it doesn't and
291you have checked your logs to verify it's not a configuration error, you might 289you have checked your logs to verify it's not a configuration error, you might
292want to consider the CVS sources. There are also daily driver snapshots 290want to consider the CVS sources. There are also daily driver snapshots
293available if you do not wish to build the full CVS. 291available if you do not wish to build the full CVS.
294</p> 292</p>
295 293
370<p> 368<p>
371Install over your XFree86 or X.org installation. You may wish to back up xfree 369Install over your XFree86 or X.org installation. You may wish to back up xfree
372or xorg-x11. 370or xorg-x11.
373</p> 371</p>
374 372
375<pre caption="Backing up XFree"> 373<pre caption="Backing up Xorg">
376# <i>quickpkg xfree</i> 374# <i>quickpkg xorg-x11</i>
377<codenote>This backs up your XFree86 package.</codenote> 375<codenote>This backs up your Xorg-X11 package.</codenote>
378# <i>make install</i> 376# <i>make install</i>
379</pre> 377</pre>
380 378
381<p> 379<p>
382Follow the "Configure XF86Config" section above. 380Follow the "Configure Xorg" section above.
383</p> 381</p>
384 382
385<p> 383<p>
386To load the appropriate DRM module in your running kernel, copy the kernel 384To load the appropriate DRM module in your running kernel, copy the kernel
387module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then 385module to <path>/lib/modules/`uname -r`/kernel/drivers/char/drm/</path> then
406<title>Get the most out of direct rendering</title> 404<title>Get the most out of direct rendering</title>
407<body> 405<body>
408 406
409<p> 407<p>
410A few options may increase performance by up to 30 percent (or more) over the 408A few options may increase performance by up to 30 percent (or more) over the
411default. Set them in <path>/etc/X11/XF86Config</path>. 409default. Set them in <path>/etc/X11/xorg.conf</path>.
412</p> 410</p>
413 411
414<pre caption="XF86Config"> 412<pre caption="xorg.conf">
415Section "Device" 413Section "Device"
416 Option "AGPMode" "4" 414 Option "AGPMode" "4"
417 <codenote>This increased FPS from 609 to 618.</codenote> 415 <codenote>This increased FPS from 609 to 618.</codenote>
418 Option "AGPFastWrite" "True" 416 Option "AGPFastWrite" "True"
419 <codenote>This had no measurable effect, but it may increase instability of your computer.</codenote> 417 <codenote>This had no measurable effect, but it may increase instability of your computer.</codenote>
441<body> 439<body>
442 440
443<p> 441<p>
444Whenever you rebuild your kernel or switch to another kernel, you'll have to 442Whenever you rebuild your kernel or switch to another kernel, you'll have to
445rebuild the kernel module. Note that you don't need to remerge xfree, but you 443rebuild the kernel module. Note that you don't need to remerge xfree, but you
446will need to remerge xfree-drm. 444will need to remerge x11-drm.
447</p> 445</p>
448 446
449</body> 447</body>
450</section> 448</section>
451 449
470</p> 468</p>
471 469
472</body> 470</body>
473</section> 471</section>
474<section> 472<section>
475<title>Direct rendering doesn't work, and in /var/log/XFree86.0.log I have an error about driver version too low.</title> 473<title>Direct rendering doesn't work, and in /var/log/Xorg.0.log I have an error about driver version too low.</title>
476<body> 474<body>
477 475
478<p> 476<p>
479You aren't using the xfree-drm driver. Check if you compiled DRM and the driver 477You aren't using the x11-drm driver. Check if you compiled DRM and the driver
480into the kernel; you shouldn't have. 478into the kernel; you shouldn't have.
481</p> 479</p>
482 480
483</body> 481</body>
484</section> 482</section>

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20