Mesa (master): mesa/st: don't call finish in st_glFlush()

Keith Whitwell keithw at kemper.freedesktop.org
Fri Mar 13 15:53:53 UTC 2009


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

Author: Keith Whitwell <keithw at vmware.com>
Date:   Fri Mar 13 15:45:21 2009 +0000

mesa/st: don't call finish in st_glFlush()

It is not the state tracker's responsibilty to inject sleeps and
pessimize performance in the hope of avoiding buffer synchronization
issues in buggy drivers.

Calling finish() here will just hide problems that need to be fixed
elsewhere.

---

 src/mesa/state_tracker/st_cb_flush.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index f8621ab..4fdb673 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -117,13 +117,16 @@ static void st_glFlush(GLcontext *ctx)
 {
    struct st_context *st = ctx->st;
 
+   /* Don't call st_finish() here.  It is not the state tracker's
+    * responsibilty to inject sleeps in the hope of avoiding buffer
+    * synchronization issues.  Calling finish() here will just hide
+    * problems that need to be fixed elsewhere.
+    */
+   st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+
    if (is_front_buffer_dirty(st)) {
-      st_finish(st);
       display_front_buffer(st);
    }
-   else {
-      st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL);
-   }
 }
 
 




More information about the mesa-commit mailing list