summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_split_copy.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2007-01-25 16:39:02 +0100
committerRoland Scheidegger <sroland@tungstengraphics.com>2007-01-25 16:39:02 +0100
commit78b64d911b4b50ab744f250522a88b3952859f98 (patch)
tree4d9fb8a780036f4d13c4305807d52315aa43fb33 /src/mesa/vbo/vbo_split_copy.c
parentdb79d7dea03d5129a05d48af19049cb740799669 (diff)
downloadexternal_mesa3d-78b64d911b4b50ab744f250522a88b3952859f98.zip
external_mesa3d-78b64d911b4b50ab744f250522a88b3952859f98.tar.gz
external_mesa3d-78b64d911b4b50ab744f250522a88b3952859f98.tar.bz2
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)
Diffstat (limited to 'src/mesa/vbo/vbo_split_copy.c')
-rw-r--r--src/mesa/vbo/vbo_split_copy.c2
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 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_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);