diff options
author | Marek Olšák <[email protected]> | 2011-03-08 00:57:48 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-03-11 21:39:31 +0100 |
commit | 7e02303497237cde958c28608477d0c355a8038b (patch) | |
tree | 6c9355b9016fae7c30440feaf9a68bb4ba03ad17 /src/mesa/state_tracker | |
parent | e968975cb57eb854769292f7c6ff773c64a386c3 (diff) |
gallium: remove flags from the flush function
The drivers have been changed so that they behave as if all of the flags
were set. This is already implicit in most hardware drivers and required
for multiple contexts.
Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag
to decide whether flush_frontbuffer should be called.
New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 8 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.h | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_syncobj.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index ce902231eff..0e27cb9a3fd 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -76,7 +76,7 @@ display_front_buffer(struct st_context *st) } -void st_flush( struct st_context *st, uint pipeFlushFlags, +void st_flush( struct st_context *st, struct pipe_fence_handle **fence ) { FLUSH_CURRENT(st->ctx, 0); @@ -89,7 +89,7 @@ void st_flush( struct st_context *st, uint pipeFlushFlags, util_blit_flush(st->blit); util_gen_mipmap_flush(st->gen_mipmap); - st->pipe->flush( st->pipe, pipeFlushFlags, fence ); + st->pipe->flush( st->pipe, fence ); } @@ -100,7 +100,7 @@ void st_finish( struct st_context *st ) { struct pipe_fence_handle *fence = NULL; - st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence); + st_flush(st, &fence); if(fence) { st->pipe->screen->fence_finish(st->pipe->screen, fence, @@ -123,7 +123,7 @@ static void st_glFlush(struct gl_context *ctx) * 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); + st_flush(st, NULL); if (is_front_buffer_dirty(st)) { display_front_buffer(st); diff --git a/src/mesa/state_tracker/st_cb_flush.h b/src/mesa/state_tracker/st_cb_flush.h index 7672b4cf1da..598536ba045 100644 --- a/src/mesa/state_tracker/st_cb_flush.h +++ b/src/mesa/state_tracker/st_cb_flush.h @@ -40,7 +40,7 @@ extern void st_init_flush_functions(struct dd_function_table *functions); extern void -st_flush(struct st_context *st, uint pipeFlushFlags, +st_flush(struct st_context *st, struct pipe_fence_handle **fence); extern void diff --git a/src/mesa/state_tracker/st_cb_syncobj.c b/src/mesa/state_tracker/st_cb_syncobj.c index 450909cf182..d575a84974b 100644 --- a/src/mesa/state_tracker/st_cb_syncobj.c +++ b/src/mesa/state_tracker/st_cb_syncobj.c @@ -72,7 +72,7 @@ static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj, assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE && flags == 0); assert(so->fence == NULL); - pipe->flush(pipe, 0, &so->fence); + pipe->flush(pipe, &so->fence); } static void st_check_sync(struct gl_context *ctx, struct gl_sync_object *obj) diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index d85bcd4f7c3..a68544ddac7 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -502,8 +502,8 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags, struct pipe_fence_handle **fence) { struct st_context *st = (struct st_context *) stctxi; - st_flush(st, flags, fence); - if (flags & PIPE_FLUSH_RENDER_CACHE) + st_flush(st, fence); + if (flags & ST_FLUSH_FRONT) st_manager_flush_frontbuffer(st); } |