mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 01:40:08 +01:00
egl: Restore "bogus" DRI2 invalidate event code.
I had removed it in commit 1e7776ca2b
because it was obviously wrong -- why do we care whether the server is a
version that emits events, if we're not watching for the server's events,
anyway? And why would you only invalidate on a server that emits
invalidate events, when the comment said to emit invalidates if the server
*doesn't*? Only, I missed that we otherwise don't flag that our buffers
might have changed at swap time at all, so the driver was only checking
for new buffers when triggered by the Viewport hack. Of course you don't
expect Viewport to be called after a swap.
So, this is effectively a revert of the previous commit, except that I
dropped the check for only emitting invalidates on a new server -- we
*always* need to invalidate if we're doing a SwapBuffers.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63435
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "9.1 and 9.2" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
b1ed7202df
commit
eed0a80137
1 changed files with 14 additions and 0 deletions
|
|
@ -743,6 +743,20 @@ dri2_swap_buffers_msc(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
|
|||
free(reply);
|
||||
}
|
||||
|
||||
/* Since we aren't watching for the server's invalidate events like we're
|
||||
* supposed to (due to XCB providing no mechanism for filtering the events
|
||||
* the way xlib does), and SwapBuffers is a common cause of invalidate
|
||||
* events, just shove one down to the driver, even though we haven't told
|
||||
* the driver that we're the kind of loader that provides reliable
|
||||
* invalidate events. This causes the driver to request buffers again at
|
||||
* its next draw, so that we get the correct buffers if a pageflip
|
||||
* happened. The driver should still be using the viewport hack to catch
|
||||
* window resizes.
|
||||
*/
|
||||
if (dri2_dpy->flush &&
|
||||
dri2_dpy->flush->base.version >= 3 && dri2_dpy->flush->invalidate)
|
||||
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
|
||||
|
||||
return swap_count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue