Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jan 2002 12:00:24 -0500
From:      Randall Hopper <aa8vb@nc.rr.com>
To:        Bjarne Wichmann Petersen <freebsd.nospam@mekanix.dk>
Cc:        freebsd-multimedia@FreeBSD.ORG
Subject:   Re: OpenGL
Message-ID:  <20020105120024.A1094@nc.rr.com>
In-Reply-To: <20020105090159.PUCN27566.fepA.post.tele.dk@there>; from freebsd.nospam@mekanix.dk on Sat, Jan 05, 2002 at 10:03:00AM %2B0100
References:  <20020103212324.ILQT16766.fepD.post.tele.dk@there> <20020104185158.RCWJ16766.fepD.post.tele.dk@there> <20020104172908.A62346@nc.rr.com> <20020105090159.PUCN27566.fepA.post.tele.dk@there>

next in thread | previous in thread | raw e-mail | index | archive | help
Bjarne Wichmann Petersen:
 |> Re: tuxracer -- Cool game!  I'd never tried that one before.  My FPS is in
 |> the 70-80 range most of the time (this is at the default 640x480, full
 |> screen, music/sounds on).  
 |
 |Ok... so there is *really* something wrong with my setup! ;)
 |
 |> So there's another puzzle for us to solve:  why your tuxracer is so slow.
 |> Are you sure you're linked with the HW accelerated libGL and not a
 |> software-only Mesa libGL (ldd /usr/local/bin/tuxracer | grep 'libGL\.')?
 |
 |$ ldd /usr/local/bin/tuxracer | grep 'libGL\.'
 |        libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x283d7000)

Thanks for the glclock numbers.

Here are some ideas for your tuxracer:

1) Verifying your libGL is the DRI-enabled one (it almost certainly is, but
   just to double-check):

   > strings /usr/X11R6/lib/libGL.so.1 | grep XF86DRI

2) DRM module loaded

   > kldstat | grep mga
    3    1 0xc041f000 183f4    mga.ko

3) DRI device perms

   > ls -ltd /dev
   drwxr-xr-x  4 root  wheel  17408 Jan  5 09:18 /dev/
   > ls -ltd /dev/dri
   drwxrwxrwx  2 root  wheel  512 Jan  5 10:13 /dev/dri/
   > ls -ltd /dev/dri/*
   crw-rw-rw-  1 root  wheel  145,   0 Jan  5 10:13 /dev/dri/card0

4) glxinfo probes drm, and renderer acknowledges DRI enabled:

   > setenv LIBGL_DEBUG verbose
   > glxinfo | grep DRI
   libGL: XF86DRIGetClientDriverName: 1.1.0 mga (screen 0)
   libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mga_dri.so
   libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mga_dri.so
   drmOpenByBusid: busid is PCI:1:5:0
   drmOpenDevice: minor is 0
   drmOpenDevice: node name is /dev/dri/card0
   drmOpenDevice: open result is 6, (OK)
   drmOpenByBusid: drmOpenMinor returns 6
   drmOpenByBusid: drmGetBusid reports PCI:1:5:0
   OpenGL renderer string: Mesa DRI G400 20010622 AGP 4x x86/MMX

   NOTE: Only the last line was printed by glxinfo.  All of the rest is
   debug prints from libGL, and the XFree86 mga dri module.

5) DRM module claimed your graphics card:

   # pciconf -l | grep drm
   drm0@pci1:5:0:  class=0x030000 card=0x0641102b chip=0x0525102b rev=0x82 \
   hdr=0x00

6) XF86Config

   I tried your XF86Config with my mouse, keyboard, and monitor sections
   plugged in and I still got the same performance out of tuxracer and
   glxgears as I was getting.  So no help there...

7) Graphics card diffs

   Yours is a G400 16MB; mind is a G450 32MB DDR.  The 3D performance is
   supposed to be about the same (my data path is 1/2 the width of
   yours, however my memory is DDR).

   I would guess you might be texture trashing, but that's unlikely since
   your video mode takes less than 1/2 of your video ram and I doubt
   tuxracer+XFree86 is eating > 8MB of texture.

   Just for kicks you might try changing your desktop to 640x480x16bpp, and
   then kick off tuxracer.  That'll probably give you over 6MB more of
   video RAM for texture.

8) XFree86.0.log acknowledges DRI enabled?:

   MGA(0): Direct rendering enabled

   (I e-mailed you my complete XFree86.0.log in case you want to compare).

9) Try running tuxracer as root

10) Now I'm down to the wild guesses.  I've read that not having an IRQ 
    assigned to your video card can cause big slowdowns, so might check
    that:

    > dmesg | grep -i drm0
    drm0: <Matrox G400 (AGP)> mem 0xf2000000-0xf27fffff,0xf2800000-0xf2803fff,\
    0xf4000000-0xf5ffffff irq 11 at device 5.0 on pci1

    Also, you might browse your AGP and video settings in your BIOS.

Good luck.  I'd be interested if you find any changes that improve your
performance in any way.  I'm still looking for tweaks here.

Randall

-- 
Randall Hopper
aa8vb@nc.rr.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020105120024.A1094>