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

Author: Pauli Nieminen <[email protected]>
Date:   Sun Mar 21 12:42:10 2010 +0200

vbo: Fix vbo_split_copy to pass correct max_index to draw.

vbo_split_copy was passing one past the max_index to draw function
which caused _tnl_draw_prims function to read uninitialized values
from copied array.

Bug was spoted in valgrind report of progs/tests/cva_huge.

---

 src/mesa/vbo/vbo_split_copy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index 2ca1112..67291ea 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -196,7 +196,7 @@ flush( struct copy_context *copy )
               &copy->dstib,
               GL_TRUE,
               0,
-              copy->dstbuf_nr );
+              copy->dstbuf_nr - 1 );
 
    /* Reset all pointers: 
     */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to