[Mesa-dev] DRI2 pixmap swapping

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


On Mit, 2011-12-07 at 09:20 +0000, Dave Airlie wrote: 
> 2011/12/7 Michel Dänzer <michel at daenzer.net>:
> > 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?

No answer?


> >> 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.
> 
> The pageflipping path fix is actually a missing call in the ati driver
> but really we shouldn't be getting to that point, since its illegal to
> do it. So blocking it earlier makes a lot more sense.
> 
> And when you add the flip fallback in the driver you end up doing a
> blit which is also wrong.

Wrong for GLX, not obviously for DRI2.

> I don't care about broken GLX clients, I just care about making
> non-broken ones work okay.

Note that I'm referring to libGL. It just makes no sense for it to even
call DRI2SwapBuffers in this case.


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


More information about the mesa-dev mailing list