draw: flush pipeline before trying to allocate more hw vertices
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 14 Apr 2008 11:32:53 +0000 (12:32 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 14 Apr 2008 11:37:19 +0000 (12:37 +0100)
src/gallium/auxiliary/draw/draw_pt.c
src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c

index c67a217982025a7e5868bf51a18d0ee4b166579d..5c16165c15ce00123850617e09e6646b27f6e87a 100644 (file)
@@ -175,10 +175,6 @@ draw_pt_arrays(struct draw_context *draw,
    frontend = draw->pt.front.vcache;
 #endif   
 
-   /* XXX: need to flush to get prim_vbuf.c to release its allocation?? 
-    */
-   draw_do_flush( draw, DRAW_FLUSH_BACKEND );
-
    frontend->prepare( frontend, prim, middle );
 
    frontend->run( frontend,
index e4e144ef19468037f942722a270e57aa2be42a26..2f8b08db79c29ec00f1e7a63381d5c15b2c3bf81 100644 (file)
@@ -243,6 +243,10 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle,
    struct draw_context *draw = feme->draw;
    void *hw_verts;
    
+   /* XXX: need to flush to get prim_vbuf.c to release its allocation?? 
+    */
+   draw_do_flush( draw, DRAW_FLUSH_BACKEND );
+
    hw_verts = draw->render->allocate_vertices( draw->render,
                                                (ushort)feme->hw_vertex_size,
                                                (ushort)fetch_count );
index fb9b2da5c07438c769933ddde583617396e903de..b5d2f81a1478557e7270acd6eb15e5115c3aaaf5 100644 (file)
@@ -177,6 +177,10 @@ static void fetch_pipeline_run( struct draw_pt_middle_end *middle,
       void *hw_verts;
       float *out;
 
+      /* XXX: need to flush to get prim_vbuf.c to release its allocation?? 
+       */
+      draw_do_flush( draw, DRAW_FLUSH_BACKEND );
+
       hw_verts = draw->render->allocate_vertices(draw->render,
                                                  (ushort)fpme->hw_vertex_size,
                                                  (ushort)fetch_count);