vbuf_flush_vertices() instead of vbuf_flush_indices() in vbuf_end()
authorBrian <brian.paul@tungstengraphics.com>
Fri, 11 Jan 2008 18:30:02 +0000 (11:30 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 11 Jan 2008 18:30:02 +0000 (11:30 -0700)
src/mesa/pipe/draw/draw_vbuf.c

index 62aa6de68f32f18a72e184e9e4626b19b5f36c6e..4f59b1b25da8366d971fa5999efd69af93c39ef5 100644 (file)
@@ -360,8 +360,14 @@ vbuf_begin( struct draw_stage *stage )
 static void 
 vbuf_end( struct draw_stage *stage )
 {
+#if 0
    /* XXX: Overkill */
    vbuf_flush_indices( stage );
+#else
+   /* By flushing vertices we avoid having the vertex buffer grow and grow */
+   struct vbuf_stage *vbuf = vbuf_stage(stage);
+   vbuf_flush_vertices( stage, vbuf->vertex_size );
+#endif
    
    stage->point = vbuf_first_point;
    stage->line = vbuf_first_line;