From 0bfd085e2866fbbd40209dcee23f0e6240583fe8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 25 Jan 2008 15:59:27 -0700 Subject: gallium: replace prim pipeline begin/end() functions with flush() This is basically half of Keith's draw/flush patch. The stage->point/line/tri() functions are now self-validating, the validator functions are installed by the flush() function. There were excessive calls to validate_pipeline(), however. This was caused by draw_prim_queue_flush() keeping a local 'first' variable that always pointed to the validate functions. Replaced 'first' with 'draw->pipeline.first'. Performance in gears is up just slightly with this patch. --- src/mesa/pipe/cell/ppu/cell_draw_arrays.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/mesa/pipe/cell/ppu') diff --git a/src/mesa/pipe/cell/ppu/cell_draw_arrays.c b/src/mesa/pipe/cell/ppu/cell_draw_arrays.c index 8286da712c..9c41b4a523 100644 --- a/src/mesa/pipe/cell/ppu/cell_draw_arrays.c +++ b/src/mesa/pipe/cell/ppu/cell_draw_arrays.c @@ -143,21 +143,18 @@ cell_draw_elements(struct pipe_context *pipe, /* draw! */ draw_arrays(draw, mode, start, count); - /* always flush for now */ - draw_flush(draw); - /* - * unmap vertex/index buffers + * unmap vertex/index buffers - will cause draw module to flush */ for (i = 0; i < PIPE_ATTRIB_MAX; i++) { if (sp->vertex_buffer[i].buffer) { - pipe->winsys->buffer_unmap(pipe->winsys, sp->vertex_buffer[i].buffer); draw_set_mapped_vertex_buffer(draw, i, NULL); + pipe->winsys->buffer_unmap(pipe->winsys, sp->vertex_buffer[i].buffer); } } if (indexBuffer) { - pipe->winsys->buffer_unmap(pipe->winsys, indexBuffer); draw_set_mapped_element_buffer(draw, 0, NULL); + pipe->winsys->buffer_unmap(pipe->winsys, indexBuffer); } /* Note: leave drawing surfaces mapped */ -- cgit v1.2.3