diff options
author | Keith Whitwell <[email protected]> | 2008-12-12 16:46:34 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-12-12 16:57:39 +0000 |
commit | d2c2e9316d043ab584794a3524f22776deb4c777 (patch) | |
tree | 1d6045093cd7c935ceb26a3afb6c57b177c0ac62 /src/mesa/state_tracker/st_cb_flush.c | |
parent | eb20e2984e51e632ef1a51620db7aca3eb89dafa (diff) |
gallium: avoid mapping same vertex buffer in subsequent frames
Quite a few util modules were maintaining a single vertex buffer over multiple
frames, and potentially reusing it in subsequent frames. Unfortunately that
would force us into syncrhonous rendering as the buffer manager would be
forced to wait for the previous rendering to complete prior to allowing the
map.
This resolves that issue, but requires the state tracker to issue a few new
flush() calls at the end of each frame.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_flush.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index cc404679416..072f2e92ad7 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -37,11 +37,14 @@ #include "st_context.h" #include "st_cb_bitmap.h" #include "st_cb_flush.h" +#include "st_cb_clear.h" #include "st_cb_fbo.h" #include "st_public.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_winsys.h" +#include "util/u_gen_mipmap.h" +#include "util/u_blit.h" static INLINE GLboolean @@ -78,7 +81,13 @@ void st_flush( struct st_context *st, uint pipeFlushFlags, { FLUSH_VERTICES(st->ctx, 0); - st_flush_bitmap_cache(st); + /* Release any vertex buffers that might potentially be accessed in + * successive frames: + */ + st_flush_bitmap(st); + st_flush_clear(st); + util_blit_flush(st->blit); + util_gen_mipmap_flush(st->gen_mipmap); st->pipe->flush( st->pipe, pipeFlushFlags, fence ); } |