From 78b64d911b4b50ab744f250522a88b3952859f98 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger <sroland@tungstengraphics.com> Date: Thu, 25 Jan 2007 16:39:02 +0100 Subject: 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) --- src/mesa/vbo/vbo_split_copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c index df69e4ca28f..d9c58537821 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_context *copy ) /* 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); -- cgit v1.2.3