vbo: initialize num_instances in a few places
authorBrian Paul <brianp@vmware.com>
Tue, 18 Jan 2011 19:16:58 +0000 (12:16 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 18 Jan 2011 19:18:32 +0000 (12:18 -0700)
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=33247
There might still be some issues with drawing multiple instances
with VBO splitting to investigate someday.

src/mesa/vbo/vbo_split_copy.c
src/mesa/vbo/vbo_split_inplace.c

index 26d0046..8c981f9 100644 (file)
@@ -222,6 +222,7 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag )
 
    prim->mode = mode;
    prim->begin = begin_flag;
+   prim->num_instances = 1;
 }
 
 
index fd5044f..f6aa576 100644 (file)
@@ -222,6 +222,7 @@ static void split_prims( struct split_context *split)
         tmpprim.indexed = 1;
         tmpprim.start = 0;
         tmpprim.count = count;
+         tmpprim.num_instances = 1;
 
         flush_vertex(split);