mesa: Branch 'vbo-0.2'

Roland Scheidegger sroland at kemper.freedesktop.org
Thu Jan 25 16:56:40 UTC 2007


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

New commits:
diff-tree 78b64d911b4b50ab744f250522a88b3952859f98 (from db79d7dea03d5129a05d48af19049cb740799669)
Author: Roland Scheidegger <sroland at tungstengraphics.com>
Date:   Thu Jan 25 16:39:02 2007 +0100

    allocate larger minimum dstelt buffer
    
    increase the minimum dstelt buffer size to avoid triggering an assertion later
    because the split is triggered before the buffer is full. This fixes cases
    where the vbo_split_copy path is hit because of maximum index limit, where the
    dstelt buffer size needed could be very small (doom3 hit that assertion with a
    vertex count of just 3)

diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index df69e4c..d9c5853 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -466,7 +466,7 @@ static void replay_init( struct copy_con
    /* Allocate an output element list:
     */
    copy->dstelt_size = MIN2(65536,
-			    copy->ib->count * 2);
+			    copy->ib->count * 2 + 3);
    copy->dstelt_size = MIN2(copy->dstelt_size,
 			    copy->limits->max_indices);
    copy->dstelt = _mesa_malloc(sizeof(GLuint) * copy->dstelt_size);



More information about the mesa-commit mailing list