GLX/DRI resource management

Kristian Høgsberg krh at bitplanet.net
Wed Sep 26 09:24:39 PDT 2007


On 9/25/07, José Fonseca <jrfonseca at tungstengraphics.com> 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:

  http://cgit.freedesktop.org/~krh/mesa/log/?h=dri2

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


More information about the xorg mailing list