Mesa (master): dri3: Flush XCB before blocking for special events

Eric Anholt anholt at kemper.freedesktop.org
Fri Jan 31 01:30:07 UTC 2014


Module: Mesa
Branch: master
Commit: f12d6d613acd3f85309e4a3063871b188c93a145
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f12d6d613acd3f85309e4a3063871b188c93a145

Author: Keith Packard <keithp at keithp.com>
Date:   Mon Nov 25 22:57:42 2013 -0800

dri3: Flush XCB before blocking for special events

XCB doesn't flush the output buffer automatically, so we have to call
xcb_flush ourselves before waiting.

Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/glx/dri3_glx.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 79bc5f0..c91f500 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -406,6 +406,7 @@ dri3_wait_for_event(__GLXDRIdrawable *pdraw)
    xcb_generic_event_t *ev;
    xcb_present_generic_event_t *ge;
 
+   xcb_flush(c);
    ev = xcb_wait_for_special_event(c, priv->special_event);
    if (!ev)
       return false;
@@ -1075,6 +1076,7 @@ dri3_find_back(xcb_connection_t *c, struct dri3_drawable *priv)
          if (!buffer->busy)
             return b;
       }
+      xcb_flush(c);
       ev = xcb_wait_for_special_event(c, priv->special_event);
       if (!ev)
          return -1;




More information about the mesa-commit mailing list