Hi,

Forget the other patch, this one actually works. I tested it with a
modified radeon driver. They way I tried to access per-screen glx
extension data before didn't work. It used some X extension list to find
the screen data structure for a given display and screen number. But
while the DRI screens are being created the display was not yet on the
extension list.

So I moved the glx extension data to the end of __DRIscreenRec and added
a pointer to __DRIscreenPrivateRec that points back to the
__DRIscreenRec. This pointer is then passed to
__glXScrEnable/DisableExtension by the driver's createScreen function.
There may be binary compatibility issues as __DRIscreenRec is accessed
by both libGL and the drivers. But adding new stuff to the end should be
fine. Those added entries are only accessed by libGL.

Then it may be better to move that data back to __GLXscreenConfigs and
add a pointer to __DRIscreenRec that points back to __GLXscreenConfigs.
Thoughts?

On Fri, 8 Aug 2003 21:57:30 +0200
Felix Kühling <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> this is a follow-up of the thread "per-screen client-side glx
> extensions". In addition to those changes the attached patch also
> removes __glXRegisterGLXFunction and __glXAddExtension. Therefore
> __driRegisterExtensions is no longer necessary and corresponding
> infrastructure was removed from dri_glx.c.
> 
> In order to avoid binary compatibility problems the remaining functions
> that are exported to the drivers were renamed. With the attached patch
> the old drivers do still compile and should still work. But they won't
> be able to dynamically enable extensions until they are updated as well.
> 
> I still see one issue in glxextensions.c. __glXGLXClientExtensions is
> set by __glXGetClientExtensions. After that
> __glxScrEnable/DisableExtension are disabled. I believe that this is
> incorrect as __glXScrEnable/DisableExtension don't change the return
> value of glXGetClientString but the value of glXQueryExtensionsString.
> Therefore the first call to __glXGetUsableExtensions should disable
> __glXScrEnable/DisableExtensions instead.
> 
> Regards,
>   Felix

------------    __\|/__    ___     ___       -------------------------
 Felix       ___\_e -_/___/ __\___/ __\_____   You can do anything,
   Kühling  (_____\Ä/____/ /_____/ /________)  just not everything
 [EMAIL PROTECTED]       \___/   \___/   U        at the same time.

Attachment: glxextensions3.patch
Description: Binary data

Reply via email to