Mesa (mesa_7_7_branch): llvmpipe: Unmapping vertex/ index buffers does NOT flush draw module anymore.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Jan 28 20:23:03 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 88cf87bd5633c0e8155e4226fc49ab36f1abc335
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=88cf87bd5633c0e8155e4226fc49ab36f1abc335

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Dec 28 22:52:41 2009 +0000

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.

---

 src/gallium/drivers/llvmpipe/lp_draw_arrays.c |    8 +++++++-
 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 a43e438..e539e71 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 */
 




More information about the mesa-commit mailing list