Felix Kühling wrote:
Hi,

as I'm going to clean up vsync related stuff on the config-0-0-1-branch
I read the code for dynamic glx extension registration in
xc/lib/GL/dri/dri_glx.c and xc/lib/GL/glx/glxextensions.[ch]. I stumbled
over this comment in front of __glXRegisterExtensions:

** In older versions of libGL (prior to October 2002) we _always_
** called this function during libGL start-up.  Now, we only call
** it from glXGetProcAddress() as a last resort.

However, __glXRegisterExtensions is still called in driCreateDisplay.
Hmm, on the other hand I found this comment in radeon_screen.c in front
of __driRegisterExtensions:

/* This function is called by libGL.so as soon as libGL.so is loaded.
 * This is where we'd register new extension functions with the dispatcher.

Do the __driRegisterExtensions functions in the drivers rely on being
called during initialisation?

In fact I believe it could be dangerous if __driRegisterExtensions was
called later as it may override extensions disabled in e.g.
CreateContext due to lacking hardware support. Fortunately
__glXRegisterExtensions returns immediately if it is called the second
or later time. Maybe it's just a matter of updating a few comments after
all.

The __driRegisterExtensions is used to add named entrypoints to the dispatch table, that can be retrieved with glXGetProcAddress, etc. It doesn't "turn on" extensions in the sense that they are added to the extensions string managed by mesa/src/extensions.c


Keith



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to