diff options
author | Brian <[email protected]> | 2007-11-07 16:59:37 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-07 16:59:37 -0700 |
commit | ae44a81d1bd40852a7cea9b8025dfa3821adc785 (patch) | |
tree | d1e0b635f17abbe2f82687701d9802755241cf18 /src/mesa/state_tracker | |
parent | 10c62bf0683437672c83339138a6802d56aeca8f (diff) |
New PIPE_FLUSH_WAIT flag for pipe->flush().
The state tracker doesn't have to directly call winsys->wait_idle() anymore.
glFlush and glFinish both go through pipe->flush() now.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 11 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_framebuffer.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_public.h | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 6354306e752..39a9f29bca8 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -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; @@ -83,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); } @@ -92,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->pipe->private ); + st_flush(ctx->st, PIPE_FLUSH_WAIT); } diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c index b04dcdb79df..4ae2837f0a0 100644 --- a/src/mesa/state_tracker/st_framebuffer.c +++ b/src/mesa/state_tracker/st_framebuffer.c @@ -179,7 +179,7 @@ st_notify_swapbuffers(struct st_framebuffer *stfb) GET_CURRENT_CONTEXT(ctx); if (ctx && ctx->DrawBuffer == &stfb->Base) { - st_flush(ctx->st); + st_flush(ctx->st, 0x0); } } diff --git a/src/mesa/state_tracker/st_public.h b/src/mesa/state_tracker/st_public.h index 9e36e1e6e59..408e1927e5b 100644 --- a/src/mesa/state_tracker/st_public.h +++ b/src/mesa/state_tracker/st_public.h @@ -70,7 +70,7 @@ void st_make_current(struct st_context *st, struct st_framebuffer *draw, struct st_framebuffer *read); -void st_flush( struct st_context *st ); +void st_flush( struct st_context *st, uint pipeFlushFlags ); void st_notify_swapbuffers(struct st_framebuffer *stfb); |