summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_flush.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-04-09 16:26:56 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-04-09 16:26:56 -0600
commit9c86c0e88b09370584f767747c52b7f352844ac5 (patch)
tree26f26e1869dbacac2c90b6f4b24eb08296526a39 /src/mesa/state_tracker/st_cb_flush.c
parenta52faa9325db178601811f4bdad6d9747de5f238 (diff)
gallium: refactor code, new flush_front_buffer() function
Diffstat (limited to 'src/mesa/state_tracker/st_cb_flush.c')
-rw-r--r--src/mesa/state_tracker/st_cb_flush.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index c7efa40e38..1fc3a20d05 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -44,26 +44,12 @@
#include "pipe/p_winsys.h"
-void st_flush( struct st_context *st, uint pipeFlushFlags,
- struct pipe_fence_handle **fence )
-{
- FLUSH_VERTICES(st->ctx, 0);
-
- st_flush_bitmap_cache(st);
-
- st->pipe->flush( st->pipe, pipeFlushFlags, fence );
-}
-
-
-static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
- struct pipe_fence_handle **fence )
+static void
+flush_front_buffer(struct st_context *st, uint pipeFlushFlags,
+ struct pipe_fence_handle **fence)
{
GLframebuffer *fb = st->ctx->DrawBuffer;
- st_flush_bitmap_cache(st);
-
- FLUSH_VERTICES(st->ctx, 0);
-
if (!fb)
return;
@@ -105,6 +91,28 @@ static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
}
+void st_flush( struct st_context *st, uint pipeFlushFlags,
+ struct pipe_fence_handle **fence )
+{
+ FLUSH_VERTICES(st->ctx, 0);
+
+ st_flush_bitmap_cache(st);
+
+ st->pipe->flush( st->pipe, pipeFlushFlags, fence );
+}
+
+
+static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
+ struct pipe_fence_handle **fence )
+{
+ st_flush_bitmap_cache(st);
+
+ FLUSH_VERTICES(st->ctx, 0);
+
+ flush_front_buffer(st, pipeFlushFlags, fence);
+}
+
+
/**
* Called via ctx->Driver.Flush()
*/