diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-12-28 22:52:41 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-12-28 22:53:41 +0000 |
commit | 926562fe271a031774d1aae850e955c2180f2816 (patch) | |
tree | c1819d15fb6113fbcc2a020308b229ce0e4e8401 /src/gallium | |
parent | 64893eb5017274a955a4166c50b56601fb7673b8 (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.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | 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 2299566c66..a96c2cad9d 100644 --- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c +++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c @@ -103,7 +103,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); @@ -112,6 +112,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 */ |