Adel Gadllah <adel.gadl...@gmail.com> writes: > --- > src/glx/dri2_glx.c | 1 + > src/glx/dri3_glx.c | 18 ++++++++++++++++++ > src/glx/dri3_priv.h | 2 ++ > src/glx/glx_pbuffer.c | 8 ++++++++ > src/glx/glxclient.h | 1 + > src/glx/glxextensions.c | 1 + > src/glx/glxextensions.h | 1 + > 7 files changed, 32 insertions(+) > > diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c > index 67fe9c1..146802a 100644 > --- a/src/glx/dri2_glx.c > +++ b/src/glx/dri2_glx.c > @@ -1288,6 +1288,7 @@ dri2CreateScreen(int screen, struct glx_display * priv) > psp->waitForSBC = NULL; > psp->setSwapInterval = NULL; > psp->getSwapInterval = NULL; > + psp->getBufferAge = NULL; > > if (pdp->driMinor >= 2) { > psp->getDrawableMSC = dri2DrawableGetMSC; > diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c > index 70ec057..697d448 100644 > --- a/src/glx/dri3_glx.c > +++ b/src/glx/dri3_glx.c > @@ -1345,6 +1345,7 @@ dri3_swap_buffers(__GLXDRIdrawable *pdraw, int64_t > target_msc, int64_t divisor, > target_msc = priv->msc + priv->swap_interval * (priv->send_sbc - > priv->recv_sbc); > > priv->buffers[buf_id]->busy = 1; > + priv->buffers[buf_id]->last_swap = priv->swap_count; > xcb_present_pixmap(c, > priv->base.xDrawable, > priv->buffers[buf_id]->pixmap, > @@ -1379,11 +1380,25 @@ dri3_swap_buffers(__GLXDRIdrawable *pdraw, int64_t > target_msc, int64_t divisor, > xcb_flush(c); > if (priv->stamp) > ++(*priv->stamp); > + > + priv->swap_count++; > }
Can't you just use priv->send_sbc for swap_count? It looks like you've got the order swapped of the two operations currently: "* The current back buffer's age is set to 1. * Any other color buffers' ages are incremented by 1 if their age was previously greater than 0." As is, when an application gets the buffer from the first swap back, it will get a 0 (invalid) age instead of a valid age.
pgp9uKajCZHwR.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev