summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_clear.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-10-02 15:36:47 +0100
committerKeith Whitwell <keithw@vmware.com>2009-10-02 19:03:15 +0100
commit918199fb0f5d84121e0ac5821168cd0e886b22e9 (patch)
treefe23b153b93f547b037cd832527ba4ae41262324 /src/mesa/state_tracker/st_cb_clear.c
parent316b4ddcf770e453b888ff7fbf96cb0aec1ce106 (diff)
mesa/st: don't reuse vertex buffers for bitmap, clear quads
Currently using max_slots > 1 will cause synchronous rendering if the driver flushes its command buffers between one bitmap and the next. Need to improve buffer_write to allow NO_WAIT (as well as no_flush) updates to buffers where we know there is no conflict with previous data.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 8a8c99f7e1..36510720a4 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -116,7 +116,18 @@ draw_quad(GLcontext *ctx,
{
struct st_context *st = ctx->st;
struct pipe_context *pipe = st->pipe;
- const GLuint max_slots = 1024 / sizeof(st->clear.vertices);
+
+ /* XXX: Need to improve buffer_write to allow NO_WAIT (as well as
+ * no_flush) updates to buffers where we know there is no conflict
+ * with previous data. Currently using max_slots > 1 will cause
+ * synchronous rendering if the driver flushes its command buffers
+ * between one bitmap and the next. Our flush hook below isn't
+ * sufficient to catch this as the driver doesn't tell us when it
+ * flushes its own command buffers. Until this gets fixed, pay the
+ * price of allocating a new buffer for each bitmap cache-flush to
+ * avoid synchronous rendering.
+ */
+ const GLuint max_slots = 1; /* 1024 / sizeof(st->clear.vertices); */
GLuint i;
if (st->clear.vbuf_slot >= max_slots) {