GLX/DRI resource management

José Fonseca jrfonseca at
Wed Sep 26 11:53:58 PDT 2007

On 9/26/07, Kristian Høgsberg <krh at> wrote:
> On 9/25/07, José Fonseca <jrfonseca at> wrote:
> > Michel,
> >
> > I'm updating Glucose to catch up with your change to xserver to make
> > sure DRI drawables are cleaned up when client dies
> > (4abd00dab7e648dab8172f6009371e4e63d0c521), where you pass the GLX
> > client  in the global __pGlxClient variable. The problem is that
> > when glucose creates drawables there is no GLX client (or the client
> > is the X server itself, if you prefer), so __pGlxClient is null or
> > junk.
> >
> > I'm wondering what's the best way to do it:
> > a) Create a ClientPtr for X server.
> > b) Use a null ClientPtr to mean the X server itself, and check for it
> > on DRICreateDrawable().
> > c) Move the resource management out of DRI code, and into glxdri code,
> > so that it doesn't get in the way.
> >
> > I'm leaning to b). Since you were the author, could you please tell me
> > what you think?
> I think b) is fine short-term solution and from Michels comments it
> looks like it's already in place.  However, c) is a better solution
> and it's what I've done in my DRI interface rework that I have over
> here:
> It does however break the DRI driver interface, so I've held back on
> pushing those changes until we can do a coordinated push.  Hopefully
> that won't be long though.
> cheers,
> Kristian

Thanks for the info, Kristian. I looked to your repository and and I also agree
that's cleaner and therefore better in the hopefully-not-so-long term.

José Fonseca

More information about the xorg mailing list