From: José Fonseca Date: Thu, 21 Jan 2010 20:13:27 +0000 (-0800) Subject: svga: Avoid synchronization issues when doing SW TNL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0bc885188464446dd94542e0af15f3985dcdf684;p=mesa.git svga: Avoid synchronization issues when doing SW TNL. --- diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c index cfbdcf2554c..aafb3e26b0b 100644 --- a/src/gallium/drivers/svga/svga_swtnl_backend.c +++ b/src/gallium/drivers/svga/svga_swtnl_backend.c @@ -122,7 +122,9 @@ svga_vbuf_render_map_vertices( struct vbuf_render *render ) char *ptr = (char*)pipe_buffer_map(screen, svga_render->vbuf, PIPE_BUFFER_USAGE_CPU_WRITE | - PIPE_BUFFER_USAGE_FLUSH_EXPLICIT); + PIPE_BUFFER_USAGE_FLUSH_EXPLICIT | + PIPE_BUFFER_USAGE_DISCARD | + PIPE_BUFFER_USAGE_UNSYNCHRONIZED); return ptr + svga_render->vbuf_offset; } @@ -264,8 +266,8 @@ svga_vbuf_render_draw( struct vbuf_render *render, svga_render->ibuf_offset = 0; } - pipe_buffer_write(screen, svga_render->ibuf, - svga_render->ibuf_offset, 2 * nr_indices, indices); + pipe_buffer_write_nooverlap(screen, svga_render->ibuf, + svga_render->ibuf_offset, 2 * nr_indices, indices); /* off to hardware */