[Mesa-dev] DRI2 pixmap swapping

Michel Dänzer michel at daenzer.net
Wed Dec 7 01:16:19 PST 2011


On Mit, 2011-12-07 at 08:40 +0000, Dave Airlie wrote: 
> >
> > I have a feeling, since dri2 is not strictly restricted to GLX, whether this
> > should really be
> > implemented in the glx code before calling into dri2? Otoh that would mean
> > the server side
> > would need to be able to handle the case anyway.
> 
> The problem is that GLX doesn't get a chance, since the only place GLX
> knows whether the drawable is window or pixmap is in the server, and
> DRI2 protocol bypasses GLX to do this.
> 
> So I'm not really sure how we can block that.

The client-side GLX code currently can't tell apart pixmaps from
windows, but is there no way it could?

There's a similar issue with glXSwapBuffers of single-buffered windows,
which is currently kludged around by the client-side DRI2 code ignoring
SwapBuffers when there's no DRI2BufferBackLeft. It would be cleaner to
deal with this at the GLX level as well.


> I suspect we want this + a DRI2 extension to disable it for other
> non-GLX use cases maybe.

I think this patch is just papering over the real issue even on the
server side, which is that the page flipping path isn't properly
handling pixmaps. Broken GLX clients can still do the wrong thing via
DRI2CopyRegion.


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the mesa-dev mailing list