From 7b5303adbf5965510061a21f40d40c931add73eb Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Fri, 4 Apr 2008 16:17:33 +0100 Subject: gallium: Call st_flush() instead of st_gl_flush() in st_finish(). This is enough for the current purpose of st_finish(), which is to wait for things to settle down before context teardown. --- src/mesa/state_tracker/st_cb_flush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker/st_cb_flush.c') diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 1de3676bda..44bf77ae71 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -107,7 +107,7 @@ void st_finish( struct st_context *st ) { struct pipe_fence_handle *fence = NULL; - st_gl_flush(st, PIPE_FLUSH_RENDER_CACHE, &fence); + st_flush(st, PIPE_FLUSH_RENDER_CACHE, &fence); st->pipe->winsys->fence_finish(st->pipe->winsys, fence, 0); st->pipe->winsys->fence_reference(st->pipe->winsys, &fence, NULL); -- cgit v1.2.3 From 1d6877b32642d718fb7b29eca647f4d1dd0f99bb Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Fri, 4 Apr 2008 16:21:42 +0100 Subject: gallium: Revert st_gl_flush() changes from when the **fence argument was added. 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker/st_cb_flush.c') diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 44bf77ae71..c90bedd3e5 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -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, -- cgit v1.2.3 From ac2ca39f8f6024b13b0ddbfe767f9dbc9a528e6c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 4 Apr 2008 12:24:25 -0600 Subject: gallium: add new call to st_flush_bitmap_cache() to fix recent regression --- src/mesa/state_tracker/st_cb_flush.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker/st_cb_flush.c') diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index c90bedd3e5..c7efa40e38 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -60,6 +60,8 @@ static void st_gl_flush( struct st_context *st, uint pipeFlushFlags, { GLframebuffer *fb = st->ctx->DrawBuffer; + st_flush_bitmap_cache(st); + FLUSH_VERTICES(st->ctx, 0); if (!fb) -- cgit v1.2.3