diff --git a/src/mesa/vbo/vbo_split.c b/src/mesa/vbo/vbo_split.c index 2f95746..08b2516 100644 --- a/src/mesa/vbo/vbo_split.c +++ b/src/mesa/vbo/vbo_split.c @@ -109,12 +109,16 @@ void vbo_split_prims( struct gl_context *ctx, const struct split_limits *limits ) { GLint max_basevertex = prim->basevertex; + GLint min_basevertex = prim->basevertex; GLuint i; - for (i = 1; i < nr_prims; i++) + for (i = 1; i < nr_prims; i++) { max_basevertex = MAX2(max_basevertex, prim[i].basevertex); + min_basevertex = MIN2(min_basevertex, prim[i].basevertex); + } - /* XXX max_basevertex is computed but not used, why? */ + min_index += min_basevertex; + max_index += max_basevertex; if (ib) { if (limits->max_indices == 0) { diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c index daa09c2..ac4fe9e 100644 --- a/src/mesa/vbo/vbo_split_copy.c +++ b/src/mesa/vbo/vbo_split_copy.c @@ -243,7 +243,7 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag ) static GLuint elt(struct copy_context *copy, GLuint elt_idx) { - GLuint elt = copy->srcelt[elt_idx]; + GLuint elt = copy->srcelt[elt_idx] + copy->prim->basevertex; GLuint slot = elt & (ELT_TABLE_SIZE-1); /* printf("elt %d\n", elt); */