пятница, 18 марта 2011 г.

AMD 785G с Phenom II X4 810

Было

% glxgears
2014 frames in 5.0 seconds = 402.682 FPS
2101 frames in 5.0 seconds = 420.139 FPS
2102 frames in 5.0 seconds = 420.367 FPS
2101 frames in 5.0 seconds = 420.153 FPS
2107 frames in 5.0 seconds = 421.336 FPS
2109 frames in 5.0 seconds = 421.762 FPS

Процессор при этом нагружен на 35-45%, причём — все четыре ядра! Это называется софтверным ускорением. :))

Включаем аппаратное 3D-ускорение на Radeon HD

1) Добавляем строчку игнорирования NOUVEAU, чтобы он не мешал графическому окружению:
% echo 'WITHOUT_NOUVEAU=true' >> /etc/make.conf



2) Пересобираем graphics/libdrm, graphics/libGL*, graphics/libglut:
% portupgrade -fp graphics/libdrm && portupgrade -fp graphics/libGL && portupgrade -fp graphics/libGLU && portupgrade -fp graphics/libglut graphics/mesa-demos

или, если есть время, так:
% portupgrade -fpr graphics/libdrm



3) Перезагружаемся и смотрим на результат:
% glxinfo | grep render
IRQ's not enabled, falling back to busy waits: 2 0
direct rendering: Yes
OpenGL renderer string: Mesa DRI R600 (RS880 9710) 20090101 TCL

% glxinfo | grep glx
IRQ's not enabled, falling back to busy waits: 2 0
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:

% glxgears
IRQ's not enabled, falling back to busy waits: 2 0
9033 frames in 5.0 seconds = 1806.251 FPS
8878 frames in 5.0 seconds = 1775.427 FPS
8993 frames in 5.0 seconds = 1798.448 FPS
8999 frames in 5.0 seconds = 1799.691 FPS
9056 frames in 5.0 seconds = 1811.054 FPS
9000 frames in 5.0 seconds = 1799.960 FPS
9031 frames in 5.0 seconds = 1806.070 FPS
8957 frames in 5.0 seconds = 1791.309 FPS
^C

% uname -rsm
FreeBSD 8.2-STABLE amd64

% pkg_info -Ex video-ati
xf86-video-ati-6.14.0_1

% pkg_info -Ex dri
dri-7.6.1,2
dri2proto-2.3
xorg-drivers-7.5.1

% pkg_info -Ex mesa
mesa-demos-7.6.1

% pkg_info -Ex libGL
libGL-7.6.1
libGLU-7.6.1


xorg.conf

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/dejavu/"
EndSection

Section "Module"
#-Load "glx"
Load "extmod"
Load "record"
Load "dbe"
Load "dri"
Load "dri2"
Load "freetype"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbLayout" "us,ru"
Option "XkbVariant" ",winkeys"
Option "XkbOptions" "grp:caps_toggle,grp_led:caps,compose:ralt"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "ServerFlags"
Option "AutoAddDevices" "false"
Option "AllowEmptyInput" "off"
Option "AllowMouseOpenFail" "true"
Option "IgnoreABI" "on"
Option "AIGLX" "true"
EndSection

Section "Monitor"
#DisplaySize 540 350 # mm
Identifier "Monitor0"
VendorName "HWP"
ModelName "HP LP2475w"
HorizSync 30.0 - 94.0
VertRefresh 48.0 - 85.0
Option "DPMS"
EndSection

Section "Modes"
Identifier "Mode0"
EndSection

Section "Device"
Option "int10" "on"
Option "BusType" "PCIE"
Option "RenderAccel" "on"
Option "AccelMethod" "exa"
Option "DynamicPM" "on"
Option "DRI" "on"
Identifier "Card0"
#Driver "vesa"
Driver "ati"
VendorName "ATI Technologies Inc"
BoardName "RS880 [Radeon HD 4200]"
#-BusID "PCI:1:5:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
#Modes "1680x1050"
Modes "1920x1200"
EndSubSection
EndSection

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "true"
Option "DAMAGE" "true"
Option "RENDER" "true"
EndSection