On Thu, 2 Jun 2011 01:16:33 +0300, Ville Syrjälä <syrj...@sci.fi> wrote: > On Wed, Jun 01, 2011 at 02:49:03PM -0700, Eric Anholt wrote: > > This fixes piglit glx-swap-singlebuffer (but not glx-swap-pixmap, > > which hits a BadMatch elsewhere that I haven't tracked down), and the > > original bug report of glean clipFlat, which was trying to do exactly > > this. > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32589 > > --- > > hw/xfree86/dri2/dri2.c | 18 ++++++++++++++++-- > > 1 files changed, 16 insertions(+), 2 deletions(-) > > > > diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c > > index 9ca378f..571f7cf 100644 > > --- a/hw/xfree86/dri2/dri2.c > > +++ b/hw/xfree86/dri2/dri2.c > > @@ -802,9 +802,23 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, > > CARD64 target_msc, > > if (pPriv->buffers[i]->attachment == DRI2BufferBackLeft) > > pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i]; > > } > > - if (pSrcBuffer == NULL || pDestBuffer == NULL) { > > + > > + /* From the GLX 1.4 specification page 34 (page 40 of the PDF): > > + * > > + * This operation is a no-op if draw was created with a > > + * non-double-buffered GLXFBConfig, or if draw is a GLXPixmap. > > + * > > + * We interpret this as "anything with no backbuffer does nothing > > + * for glXSwapBuffers(). See piglit glx-swap-pixmap and > > + * glx-swap-singlebuffer. > > + */ > > Shouldn't this be handled in some GLX code? Doing it client side would > also avoid the pointless X request.
This is a client doing something stupid that we don't care to optimize. I also don't trust the client to have an accurate representation of the current set of attached buffers in the case of drawable sharing (that unfortunate feature of GLX that makes everything about it painful). And, this ErrorF was clearly "I dunno what should happen here, think about it when you get the message". We hit it, and I think this is the correct response (do nothing) for any case where there is no backbuffer present.
pgpY5BpEBTMwA.pgp
Description: PGP signature
_______________________________________________ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com