|
最近重新emerge 了Gentoo,整个系统是用gcc 4.0.1-beta20050507编译的,内核和X都用的不稳定的版本,整个系统都是超级新,同时也为系统的兼容性和稳定性埋下了不少隐患,比如我的ATI Radeon 9600XT(9500改的),因为ATI 的Linux驱动不支持gcc4和大于6.8.2的Xorg,害的我好长时间里都玩不了3D游戏。最近偶然在Gentoo Forums上发现了怎么获得安装开源的R300显卡驱动的方法,希望能给和我有同样烦恼的Gentoo Fans一点帮助。(不过想想像我这样做小白鼠做的这么彻底的ATI&Gentoo Fans应该不多别吧,呵呵 )
1.我的系统如下:
- Gentoo Linux 2005.0
- GCC-4.0.1-beta20050507
- Xorg-6.8.99.5
- Nitro-source-2.6.12_rc4-r1
复制代码
2.Gentoo Forums原贴链接:
http://forums.gentoo.org/viewtopic-p-2419114.html#2419114
3.R300开源驱动的获得和安装方法:
此驱动还处于High Development当中,我们只能从CVS中获得源代码编译
a.DRM源码:
- cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/r300 login
- cvs -z3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/r300 co r300_driver
- cd r300_driver/drm
- rm -rf shared
- ln -s shared-core shared
- cd linux-core
- make radeon.o
- cp *.ko /lib/modules/你的内核版本号/kernel/drivers/char/drm
- modules-update
复制代码
b.Drivers源码:
- cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa login
- cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa co Mesa
- mkdir Mesa/src/mesa/drivers/dri/r300
- lndir /你源码所在绝对路径/r300_driver/r300 /你源码所在绝对路径/Mesa/src/mesa/drivers/dri/r300
- cd Mesa
- **编辑** configs/linux-dri (或者linux-dri-x86-64)
- 在CONFIG_NAME之上加入 DRM_SOURCE_PATH=/你源码所在绝对路径/r300_driver/drm
- 将DRI_DIRS行改为"DRI_DIRS = dri_client r300"
- **完成编辑**
- make linux-dri-x86 (或者linux-dri-x86-64)
- cp lib/r300_dri.so /usr/lib/modules/dri (或者cp Mesa/lib64/r300_dri.so /usr/lib64/modules/dri)
- 退出X,[CODE]modprobe radeon
复制代码 ,内容然后重启X,执行glxinfo
- OpenGL vendor string: Tungsten Graphics, Inc.
- OpenGL renderer string: Mesa DRI R300 20040924 AGP 4x x86/MMX+/3DNow!+ TCL
- OpenGL version string: 1.3 Mesa 6.3
复制代码
看到以上提示信息,说明驱动就已经安装成功了。
4.R300开源驱动兼容性测试:
a.先看看glxgears的测试结果吧
- 3506 frames in 5.0 seconds = 701.081 FPS
- 3528 frames in 5.0 seconds = 705.530 FPS
- 3519 frames in 5.0 seconds = 702.661 FPS
- 3597 frames in 5.0 seconds = 718.193 FPS
- 3620 frames in 5.0 seconds = 722.828 FPS
- 3541 frames in 5.0 seconds = 708.166 FPS
- 3421 frames in 5.0 seconds = 682.939 FPS
- 3533 frames in 5.0 seconds = 706.598 FPS
- 3556 frames in 5.0 seconds = 711.180 FPS
- 3408 frames in 5.0 seconds = 681.520 FPS
- 3412 frames in 5.0 seconds = 682.370 FPS
- 3370 frames in 5.0 seconds = 672.626 FPS
- 3322 frames in 5.0 seconds = 664.093 FPS
- 3058 frames in 5.0 seconds = 610.970 FPS
复制代码
再看看我之前系统ati-drivers 8.10.19的glxgears分数:
- 11422 frames in 5.0 seconds = 2284.400 FPS
- 12282 frames in 5.0 seconds = 2456.400 FPS
- 12295 frames in 5.0 seconds = 2459.000 FPS
- 12299 frames in 5.0 seconds = 2459.800 FPS
- 12304 frames in 5.0 seconds = 2460.800 FPS
- 12309 frames in 5.0 seconds = 2461.800 FPS
- 12312 frames in 5.0 seconds = 2462.400 FPS
- 12314 frames in 5.0 seconds = 2462.800 FPS
- 12299 frames in 5.0 seconds = 2459.800 FPS
- 12299 frames in 5.0 seconds = 2459.800 FPS
- 12304 frames in 5.0 seconds = 2460.800 FPS
- 12309 frames in 5.0 seconds = 2461.800 FPS
- 12309 frames in 5.0 seconds = 2461.800 FPS
- 12314 frames in 5.0 seconds = 2462.800 FPS
复制代码
OS的驱动的性能只有ati-drivers的1/3,需要加以时日,再接再励
b.能正常运行的3D游戏:
1)supertux
2)quake3-demo
3)torcs
4)cube
5)enemy-territory
...更多游戏我会在测试后加进来
已知测试有问题的游戏:
1)ut2004-demo
能正常运行游戏,速度也能接受,但贴图错误比较严重
...更多游戏我会在测试后加进来
虽然开源的R300驱动性能目前还是不很理想,但我们还是可以期盼它能在将来做的比ati-drivers更好。所谓只要敢想,一切皆有可能 :cool: |
|