Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2001 15:39:16 -0800
From:      Nick Sayer <nsayer@quack.kfu.com>
To:        freebsd-stable@FreeBSD.ORG
Cc:        pir@pir.net
Subject:   DRI and OpenGL/Mesa (was Re: GeForce2 support)
Message-ID:  <3AC27624.3040708@quack.kfu.com>
References:  <3AC19444.887F3299@quake.com.au> <20010328023719.E28036@pir.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Radcliffe wrote:
[...]

> 
> I'd assume because it's too linux specific. Other than the XFree86
> support all that is missing is OpenGL support, which isn't something
> anyone seems to have time for and I can't say I'm bothered about.

Undoubtedly there is a better mailing list to ask this in. :-)

I've played lately with XFree86-4.x, Mesa, DRI, etc. I think I've been 
doing pretty well. The things I've been using are openuniverse and 
bzflag. I've got two machines I play with. One has a 3dfx card, the 
other a Matrox G200. A friend of mine has also had success with a G400.

So far as I can tell I am getting hardware accelleration of some sort. 
If I disable the DRI extension, performance suffers, QED.

First, install XFree86 4.0.3 and the latest Mesa port.

Next actually go into the XFree86-4 port and do a 'make patch' (this 
presumes you installed XFree86-4 from a package rather than compiling it 
yourself. If not, then the make patch will not be necessary). cd 
work/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel.

Next, edit mga/mga_drv.c. Change MGA_MAJOR to 2 and MGA_MINOR to 0.

Next, make symlinks from 
../../../linux/drm/kernel/{drm,i810_drm,mga_drm,r128_drm,sis_drm}.h to .

Now type 'make'. The result should be that you will find drm/drm.ko, 
gamma/gamma.ko, mga/mga.ko and tdfx/tdfx.ko. Move these into /modules.

Now edit /boot/loader.conf.  Add

agp_load="YES"
tdfx_load="YES"

changing "tdfx" to "mga" or "gamma" if you have that sort of card.

Reboot. You should see something like this in your kernel boot:

drm0: <3Dfx Voodoo 3 graphics accelerator> port 0x9000-0x90ff mem 
0xfc000000-0xf
dffffff,0xf6000000-0xf7ffffff irq 11 at device 0.0 on pci1
info: [drm] AGP at 0xf8000000 64MB
info: [drm] Initialized tdfx 1.0.0 19991009 on minor 0

depending on which card you have.

Make sure your "Module" section in your XF86Config file has a Load line 
for glx, GLcore and dri.

Now fire up X. xdpyinfo should show the XFree86-DRI extension.

So far so good. Now any app I have found that links to Mesa shows great 
performance.

glxinfo does not, however, unless I force it to use Mesa's libGL.so with 
LD_PRELOAD.

So I guess my questions are:

1. Does this procedure result in the best performance possible today 
with FreeBSD?

2. Why aren't the modules being built in the XFree86 port?

3. Why does the XFree86 libGL.so not appear to work with DRI? glxinfo 
says direct rendering is off unless I force it to use the Mesa libGL.

4. Is there some aspect of this that I am naively misunderstanding?



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




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