draw: defensively reset render primitive some more
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 26 May 2008 17:54:35 +0000 (18:54 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 26 May 2008 17:54:35 +0000 (18:54 +0100)
src/gallium/auxiliary/draw/draw_pt_emit.c

index 01396a749ee7fd5e9032bce1455fbeb046b89232..d0c9577ee644879a2f8b7eeba4aa5e03e57c2bd3 100644 (file)
@@ -213,6 +213,14 @@ void draw_pt_emit_linear(struct pt_emit *emit,
     */
    draw_do_flush( draw, DRAW_FLUSH_BACKEND );
 
+   /* XXX: and work out some way to coordinate the render primitive
+    * between vbuf.c and here...
+    */
+   if (!draw->render->set_primitive(draw->render, emit->prim)) {
+      assert(0);
+      return;
+   }
+
    hw_verts = render->allocate_vertices(render,
                                        (ushort)translate->key.output_stride,
                                        (ushort)count);