Mesa (master): dri2: add code to dri2_Flush extension.

Cooper Yuan cooperyuan at kemper.freedesktop.org
Mon Aug 15 18:33:49 PDT 2011


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

Author: Cooper Yuan <cooperyuan at gmail.com>
Date:   Tue Aug 16 09:32:10 2011 +0800

dri2: add code to dri2_Flush extension.

It's going to flush client's commands in eglWaitClient(). Before this,
egl applications using pixmap or pbuffer flicker because of no flush.

Reviewed-by: Alan Hourihane

---

 src/gallium/state_trackers/dri/drm/dri2.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index d491e46..908a735 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -46,6 +46,10 @@
 static void
 dri2_flush_drawable(__DRIdrawable *draw)
 {
+   struct dri_drawable *drawable = dri_drawable(draw);
+   struct dri_context *ctx = dri_get_current(draw->driScreenPriv);
+
+   ctx->st->flush(ctx->st, 0, NULL);
 }
 
 static void



More information about the mesa-commit mailing list