summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-12-28 22:52:41 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-01-28 20:22:43 +0000
commit88cf87bd5633c0e8155e4226fc49ab36f1abc335 (patch)
treea73bab44f27c1d278696ffb4c44c4b553b0bb2a3
parent31b3420688dbf7fc2282f0d1fe13e51fe9e1f9b6 (diff)
llvmpipe: Unmapping vertex/index buffers does NOT flush draw module anymore.
Not since 6094e79f4e3350d123c7532b1c73faa60834a62d. Drivers now need to flush draw module explicitely (which explains why all those previous commits adding draw_flushes calls were necessary). This is a good thing, but it's tricky to get this right in face of user buffers (it's not even clear who has the responsibility to flush when a user buffer is seen -- statetracker or pipe driver), so just force flush (temporarily) since it's not a bottleneck now.
-rw-r--r--src/gallium/drivers/llvmpipe/lp_draw_arrays.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index a43e438064c..e539e713226 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -101,7 +101,7 @@ llvmpipe_draw_range_elements(struct pipe_context *pipe,
draw_arrays(draw, mode, start, count);
/*
- * unmap vertex/index buffers - will cause draw module to flush
+ * unmap vertex/index buffers
*/
for (i = 0; i < lp->num_vertex_buffers; i++) {
draw_set_mapped_vertex_buffer(draw, i, NULL);
@@ -110,6 +110,12 @@ llvmpipe_draw_range_elements(struct pipe_context *pipe,
draw_set_mapped_element_buffer(draw, 0, NULL);
}
+ /*
+ * TODO: Flush only when a user vertex/index buffer is present
+ * (or even better, modify draw module to do this
+ * internally when this condition is seen?)
+ */
+ draw_flush(draw);
/* Note: leave drawing surfaces mapped */