aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_split_inplace.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_split_inplace.c')
-rw-r--r--mesalib/src/mesa/vbo/vbo_split_inplace.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_split_inplace.c b/mesalib/src/mesa/vbo/vbo_split_inplace.c
index 9e596f668..00464049d 100644
--- a/mesalib/src/mesa/vbo/vbo_split_inplace.c
+++ b/mesalib/src/mesa/vbo/vbo_split_inplace.c
@@ -62,6 +62,8 @@ struct split_context {
static void flush_vertex( struct split_context *split )
{
+ struct gl_context *ctx = split->ctx;
+ const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
struct _mesa_index_buffer ib;
GLuint i;
@@ -82,8 +84,10 @@ static void flush_vertex( struct split_context *split )
assert(split->max_index >= split->min_index);
- split->draw(split->ctx,
- split->array,
+ ctx->Array._DrawArrays = split->array;
+ ctx->NewDriverState |= ctx->DriverFlags.NewArray;
+
+ split->draw(ctx,
split->dstprim,
split->dstprim_nr,
split->ib ? &ib : NULL,
@@ -92,6 +96,9 @@ static void flush_vertex( struct split_context *split )
split->max_index,
NULL);
+ ctx->Array._DrawArrays = saved_arrays;
+ ctx->NewDriverState |= ctx->DriverFlags.NewArray;
+
split->dstprim_nr = 0;
split->min_index = ~0;
split->max_index = 0;