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 26d0046e83d8cc2c43e8e2f763608b8c785a552e..8c981f93e5c66c0f25204ae4d55e474462e833c9 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 fd5044fac0590b1f4dd62b881bd0b48a66b371e5..f6aa576b6c8eb4292ed32f1816437276c455063f 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);