Revert "st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME)."
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 18 Feb 2010 12:37:09 +0000 (13:37 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 18 Feb 2010 13:04:14 +0000 (14:04 +0100)
We probably don't want to propagate this condition to the pipe driver,
this reverts commit f455ca6490fcb65781b21f81c7117bd923e250d1 and the
dri_update_buffer flush altogether until an agreement is reached.

src/gallium/state_trackers/dri/dri_drawable.c
src/mesa/state_tracker/st_cb_flush.c

index 195ae7b8bc2eeee3042e2f584221aaa59885e748..8843e087a81c1b94a1366c13ec10bc30d32d21be 100644 (file)
@@ -288,8 +288,6 @@ dri_update_buffer(struct pipe_screen *screen, void *context_private)
        ctx->r_stamp == *ctx->rPriv->pStamp)
       return;
 
-   st_flush(ctx->st, PIPE_FLUSH_FRAME, NULL);
-
    ctx->d_stamp = *ctx->dPriv->pStamp;
    ctx->r_stamp = *ctx->rPriv->pStamp;
 
index 573c78336c488daae3ba86a2c685acb574c9b815..1329f807bc9a43a81e53992478bf2b9a8df48ddd 100644 (file)
@@ -102,10 +102,6 @@ void st_flush( struct st_context *st, uint pipeFlushFlags,
    util_gen_mipmap_flush(st->gen_mipmap);
 
    st->pipe->flush( st->pipe, pipeFlushFlags, fence );
-
-   if ((pipeFlushFlags & PIPE_FLUSH_FRAME) &&
-       is_front_buffer_dirty(st))
-      display_front_buffer(st);
 }
 
 
@@ -139,6 +135,10 @@ static void st_glFlush(GLcontext *ctx)
     * problems that need to be fixed elsewhere.
     */
    st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+
+   if (is_front_buffer_dirty(st)) {
+      display_front_buffer(st);
+   }
 }
 
 
@@ -150,6 +150,10 @@ static void st_glFinish(GLcontext *ctx)
    struct st_context *st = ctx->st;
 
    st_finish(st);
+
+   if (is_front_buffer_dirty(st)) {
+      display_front_buffer(st);
+   }
 }