Hide texture layout details from the state tracker.
[mesa.git] / src / mesa / state_tracker / st_cb_flush.c
index 819957a1ee6fe5f8001bfade2fbee2e45bf469bf..95149a32006bb70c2e24e97ecd1f99a992d8dae5 100644 (file)
@@ -43,7 +43,7 @@
 #include "pipe/p_winsys.h"
 
 
-void st_flush( struct st_context *st )
+void st_flush( struct st_context *st, uint pipeFlushFlags )
 {
    GLframebuffer *fb = st->ctx->DrawBuffer;
 
@@ -53,7 +53,7 @@ void st_flush( struct st_context *st )
     * short-circuiting this, or perhaps pass an "optional" flag down
     * to the driver so that it can make the decision.
     */
-   st->pipe->flush( st->pipe, 0 );
+   st->pipe->flush( st->pipe, pipeFlushFlags );
 
    if (!fb)
       return;
@@ -71,7 +71,8 @@ void st_flush( struct st_context *st )
 
       /* Hook for copying "fake" frontbuffer if necessary:
        */
-      st->pipe->winsys->flush_frontbuffer( st->pipe->winsys, front_surf );
+      st->pipe->winsys->flush_frontbuffer( st->pipe->winsys, front_surf,
+                                           st->pipe->priv );
       st->flags.frontbuffer_dirty = 0;
    }
 }
@@ -82,7 +83,7 @@ void st_flush( struct st_context *st )
  */
 static void st_Flush(GLcontext *ctx)
 {
-   st_flush(ctx->st);
+   st_flush(ctx->st, 0x0);
 }
 
 
@@ -91,10 +92,7 @@ static void st_Flush(GLcontext *ctx)
  */
 static void st_Finish(GLcontext *ctx)
 {
-   struct st_context *st = ctx->st;
-
-   st_flush( st );
-   st->pipe->winsys->wait_idle( st->pipe->winsys );
+   st_flush(ctx->st, PIPE_FLUSH_WAIT);
 }