gallium: Revert st_gl_flush() changes from when the **fence argument was added.
authorMichel Dänzer <michel@tungstengraphics.com>
Fri, 4 Apr 2008 15:21:42 +0000 (16:21 +0100)
committerMichel Dänzer <michel@tungstengraphics.com>
Fri, 4 Apr 2008 15:27:45 +0000 (16:27 +0100)
As st_gl_flush() isn't used by st_finish() anymore, it doesn't have to make
sure pipe->flush() always gets called.

src/mesa/state_tracker/st_cb_flush.c

index 44bf77ae71eeeb3a31056e61a7aa7152dba6cf55..c90bedd3e5ff995b95c7e3b129c57b7669eee83c 100644 (file)
@@ -60,7 +60,7 @@ static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
 {
    GLframebuffer *fb = st->ctx->DrawBuffer;
 
-   st_flush( st, pipeFlushFlags, fence );
+   FLUSH_VERTICES(st->ctx, 0);
 
    if (!fb)
       return;
@@ -85,6 +85,15 @@ static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
          = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
       struct pipe_surface *front_surf = strb->surface;
 
+      /* If we aren't rendering to the frontbuffer, this is a noop.
+       * This should be uncontroversial for glFlush, though people may
+       * feel more strongly about glFinish.
+       *
+       * Additionally, need to make sure that the frontbuffer_dirty
+       * flag really gets set on frontbuffer rendering.
+       */
+      st->pipe->flush( st->pipe, pipeFlushFlags, fence );
+
       /* Hook for copying "fake" frontbuffer if necessary:
        */
       st->pipe->winsys->flush_frontbuffer( st->pipe->winsys, front_surf,