Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2002 15:27:36 -0500 (EST)
From:      <joeo@cracktown.com>
To:        Randall Hopper <aa8vb@nc.rr.com>
Cc:        "Karel J. Bosschaart" <karelj@wop21.wop.wtb.tue.nl>, <multimedia@FreeBSD.ORG>
Subject:   Re: Unreal Tournament (was Re: OpenGL)
Message-ID:  <Pine.LNX.4.30.0201131510560.20233-100000@asmodean-ssn.nks.net>
In-Reply-To: <20020113140539.A65807@nc.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Short answer.  Grab the *_dri.so's out of the linux binary distribution of
XFree86-4.1.0.  There shouldn't have been major changes to prevent this
from working with the MGA.

Okay, here's the deal with the linux emulation prblems for the compiled
_linux_ libs for the CVS resident stuff...

in xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c there are
several calls to drmOpenMinor() that need to be wrappped with a

#if defined(XFree86Server)
	fd = drmOpenMinor(i, 1);
#else
	fd = drmOpenMinor(i, 0);
#endif

If that function is called with the create flag set the *_dri.so's never
fall back to just trying to open the /dev/dri/card? devices by
name, ignoring the major number on the device node (which is  different
between freebsd and linux for the dri device).

On Sun, 13 Jan 2002, Randall Hopper wrote:

> Karel J. Bosschaart:
>  |> Cool!  I wonder if you could point me to how to get going with Unreal
>  |> Tournament (client) on FreeBSD.  I'm hyped to try that with DRI now running
>  |> here on my G450/A7M266.
>  |
>  |Sure: you need to install the XFree86-4 libraries in /compat/linux. Nowadays
>  |there is a port /usr/ports/graphics/linux_dri that does this for you, unless
>  |you have DRI-CVS. Then you have to take care that you have exactly the same
>  |library version in place under /compat/linux. Now you can try a linux testing
>  |program such as glxinfo and see if it gives reasonable output. I took the
>  |Linux version of glxinfo from http://dri.sourceforge.net/res.phtml .
>  |(But maybe it's installed by the linux_dri port nowadays - didn't try it
>  |out yet) ...
>
> Ok, I just built exactly the same XFree86 CVS snapshot I'm running on
> FreeBSD on Linux, and installed the resulting libGL and libGLU libs,
> glxinfo executable, and X11R6/lib/modules in /compat/linux/usr/X11R6.
>
> Running this Linux glxinfo with LIBGL_DEBUG set now shows that the Linux
> glxinfo can't open /dev/dri/card0, whereas the FreeBSD glxinfo can.
>
> Did you hit this?  Do I need to be running a Linux X server for this to work?
> /compat/linux/dev doesn't even exist here.
>
> Thanks for any tips,
>
> Randall
>
> Linux glxinfo:
>
>      > ./glxinfo
>      name of display: :0.0
>      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
>      drmOpenByBusid: drmOpenMinor returns -1003
>      drmOpenDevice: minor is 1
>      drmOpenDevice: node name is /dev/dri/card1
>      drmOpenByBusid: drmOpenMinor returns -1003
>      drmOpenDevice: minor is 2
>      drmOpenDevice: node name is /dev/dri/card2
>      drmOpenByBusid: drmOpenMinor returns -1003
>      ...
>      drmOpenDevice: minor is 14
>      drmOpenDevice: node name is /dev/dri/card14
>      drmOpenByBusid: drmOpenMinor returns -1003
>      libGL error: failed to open DRM: Operation not permitted
>      libGL error: reverting to (slow) indirect rendering
>      display: :0  screen: 0
>      direct rendering: No
>      ...
>
> FreeBSD glxinfo:
>
>      > /usr/X11R6/bin/glxinfo
>      name of display: :0.0
>      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
>      display: :0  screen: 0
>      direct rendering: Yes
>
>
>



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?Pine.LNX.4.30.0201131510560.20233-100000>