On Fri, 30 Jul 2004 15:24:03 -0700
Ian Romanick <[EMAIL PROTECTED]> wrote:

> Felix Kühling wrote:
> 
> > I'm looking into porting the savage driver to the new interface so it
> > can be built in the Mesa tree. I took a look at the r128 and mga drivers
> > for reference. I noticed that the old drivers (I still have a
> > savage-2-0-0-branch lying around) used to check the DRI/DDX/DRM versions
> > (using driCheckDriDdxDrmVersions) in the CreateScreen or InitDriver
> > function. This check is gone in the current drivers and replaced by a
> > version check in the CreateNewScreen function (using
> > driCheckDriDdxDrmVersions2). However, as far as I understand this
> > function is only called if the driver is loaded by a new libGL. When the
> > driver is built without NEW_INTERFACE_ONLY and loaded by an old libGL
> > then there are no version checks any more. Am I missing something?
> 
> An old libGL will call the driver's CreateScreen function.  This 
> function calls __driUtilCreateScreen, which does the extra work that is 
> now done in a new libGL, then calls the driver's CreateNewScreen. 
> Whether you're using an old libGL or a new one, you eventually get to 
> CreateNewScreen.

Not quite. __driUtilCreateScreen does call __driUtilCreateNewScreen, but
from there you never get back to the driver's CreateNewScreen function.
New interface drivers call __driUtilCreateNewScreen from
driverCreateNewScreen, not the other way around. And the savage driver,
which is not ported yet, doesn't even have a driverCreateNewScreen
function. So I still believe a new driver loaded by an old libGL never
checks the DRI/DDX/DRM versions.

I verified this with the radeon driver by inserting a debug printf at
the start of __driCreateNewScreen. Then I ran glxgears once with a new
libGL and once with an old one (from XFree86 4.3). In the first case I
saw the debug output, in the second case I didn't.

I guess the version check in the InitDriver/CreateScreen function is
still needed for the old interface.

<OT>
First I tried to verify my claims by setting a breakpoint in gdb using
an old libGL. But unfortunately I can't debug DRI apps any more. I get
an error message like this as soon as I try to run the app:

  Error while reading shared library symbols:
  Cannot find new threads: capability not available
  Cannon find user-level thread for LWP xxxx: capability not available

I guess I'd have to upgrade gdb. The current gdb version on this box is
5.3.
</OT>

Felix

| Felix Kühling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to