X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fvbo%2Fvbo_split_inplace.c;h=9628227e7c46cc021411870bbf62dd99e22c6f15;hb=e87320b5e033a911d4ced2d516e479cdf1bc9228;hp=958afccd0c0a278e2c30a5288a6cc2a5f64e89a0;hpb=eb9a5b6d5127858b01ec12672c999e7d25cd7aed;p=mesa.git diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c index 958afccd0c0..9628227e7c4 100644 --- a/src/mesa/vbo/vbo_split_inplace.c +++ b/src/mesa/vbo/vbo_split_inplace.c @@ -58,40 +58,24 @@ struct split_context { static void flush_vertex( struct split_context *split ) { - GLint min_index, max_index; + GLuint min_index, max_index; + GLuint i; if (!split->dstprim_nr) return; - if (split->ib) { - /* This should basically be multipass rendering over the same - * unchanging set of VBO's. Would like the driver not to - * re-upload the data, or swtnl not to re-transform the - * vertices. - */ - assert(split->max_index - split->min_index < split->limits->max_verts); - min_index = split->min_index; - max_index = split->max_index; - } - else { - /* Non-indexed rendering. Cannot assume that the primitives are - * ordered by increasing vertex, because of entrypoints like - * MultiDrawArrays. - */ - GLuint i; - min_index = split->dstprim[0].start; - max_index = min_index + split->dstprim[0].count - 1; + min_index = split->dstprim[0].start; + max_index = min_index + split->dstprim[0].count - 1; - for (i = 1; i < split->dstprim_nr; i++) { - GLuint tmp_min = split->dstprim[i].start; - GLuint tmp_max = tmp_min + split->dstprim[i].count - 1; + for (i = 1; i < split->dstprim_nr; i++) { + GLuint tmp_min = split->dstprim[i].start; + GLuint tmp_max = tmp_min + split->dstprim[i].count - 1; - if (tmp_min < min_index) - min_index = tmp_min; + if (tmp_min < min_index) + min_index = tmp_min; - if (tmp_max > max_index) - max_index = tmp_max; - } + if (tmp_max > max_index) + max_index = tmp_max; } assert(max_index >= min_index); @@ -221,7 +205,7 @@ static void split_prims( struct split_context *split) ib.count = count; ib.type = GL_UNSIGNED_INT; - ib.obj = split->ctx->Array.NullBufferObj; + ib.obj = split->ctx->Shared->NullBufferObj; ib.ptr = elts; tmpprim = *prim;