[Mesa-dev] [PATCH 7.11] gallium/dri: Handle xserver that doesn't send needless DRI2 invalidate events
Ville Syrjälä
syrjala at sci.fi
Fri Jan 13 02:19:37 PST 2012
On Fri, Jan 13, 2012 at 09:10:15AM +0000, Dave Airlie wrote:
> On Sun, Dec 18, 2011 at 4:22 PM, Ville Syrjälä <syrjala at sci.fi> wrote:
> > Ever since xserver commit 531869448d07e00ae241120b59f3aaaa5709d59c,
> > the server no longer sends invalidate events to clients, unless they
> > have performed a GetBuffers request since the drawable was last
> > invalidated.
> >
> > If the drawable gets invalidated immediately after the GetBuffers
> > request was processed by the X server, it's possible that Xlib
> > will process the invalidate event while waiting for the GetBuffers
> > reply. So the server, thinking the client knows that the buffers
> > are invalid, is waiting for another GetBuffers request before
> > sending any more invalidate events. The client, on the other hand,
> > believes the buffers to be valid, and thus is expecting to receive
> > another invalidate event before it has to send another GetBuffers
> > request. The end result is that the client never again sends
> > a GetBuffers request.
> >
> > To avoid this problem, take a snapshot of lastStamp before
> > doing GetBuffers, and retry if the snapshot and the current
> > lastStamp no longer match after the GetBuffers reply has been
> > processed.
> >
> > Signed-off-by: Ville Syrjälä <syrjala at sci.fi>
> > ---
> > It looks like master should already handle this, as there's a
> > retry loop inside st_framebuffer_validate(). I didn't test that
> > in practice though.
>
> I'd really like to know if master can handle it before pulling a patch
> that isn't in master into 7.11.
Well, for someone using master, it should be easy to test. Just run
glxgears and resize the window aggressively. So far I've been too lazy
to figure out what, if anything, I need to upgrade to try master.
--
Ville Syrjälä
syrjala at sci.fi
http://www.sci.fi/~syrjala/
More information about the mesa-dev
mailing list