|
From: Michel D. <mi...@da...> - 2010-01-21 22:39:04
|
On Sat, 2010-01-16 at 23:01 +0100, Francisco Jerez wrote:
> When a buffer invalidation event is received from the X server, the
> "invalidate" hook of the DRI2 flush extension is executed: A generic
> implementation (dri2InvalidateDrawable) is provided that just bumps
> the "pStamp" sequence number in __DRIdrawableRec.
>
> For old servers not supporting buffer invalidation events, the
> invalidate hook will be called after flushing the fake front/back
> buffer (that's typically once per frame -- not a lot worse than the
> situation we were in before).
When the invalidate event is available, IMO the buffers should also only
be invalidated after a buffer swap / front buffer flush, not 'in the
middle of a frame'.
> No effort has been made on preserving backwards compatibility with
> version 2 of the flush extension, but I think it's acceptable because
> AFAIK no released stack is making use of it.
IIRC it was added for a released but proprietary driver.
> @@ -378,17 +394,14 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
> /* Old servers can't handle swapbuffers */
> if (!pdp->swapAvailable) {
> dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
> + dri2LegacyInvalidate(pdraw);
> +
> return 0;
> }
>
Doesn't this also need to call dri2LegacyInvalidate() if
(pdp->swapAvailable) but (!pdp->invalidateAvailable)?
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
|