svga: reset vertex buffer offset in svga_release_user_upl_buffers()
authorBrian Paul <brianp@vmware.com>
Thu, 26 Jan 2012 18:32:01 +0000 (11:32 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 26 Jan 2012 18:38:30 +0000 (11:38 -0700)
commit04341e51cea32d6e54d99019dd00ec56e77e27f9
treece52df1df6186f4c2f0d0e381fe5ddf710116d58
parent6549e721addc8fdf6b44450bf40ca14052a7745d
svga: reset vertex buffer offset in svga_release_user_upl_buffers()

This function releases the buffer that contains user-space vertex data.
The buffer_offset field points into that buffer.  So reset the
buffer_offset to zero when we release the buffer so that subsequent
draws don't inadvertantly get a bad offset.

Fixes error messages / failed assertions (in the draw module's bounds/size
checking code) when running piglit's polygon-mode test.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_pipe_draw.c