[Mesa-dev] DRI2 pixmap swapping

Dave Airlie airlied at gmail.com
Wed Dec 7 01:20:22 PST 2011


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?
>
> 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.

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.

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

Dave.


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


More information about the mesa-dev mailing list