aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/cell/ppu
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-25 15:59:27 -0700
committerBrian <[email protected]>2008-01-25 17:22:56 -0700
commit0bfd085e2866fbbd40209dcee23f0e6240583fe8 (patch)
tree5cefec02084d42517848529161b734d73557059a /src/mesa/pipe/cell/ppu
parentbd8bf60b6f2402895e7159a4df644f8a4a307cf5 (diff)
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.
Diffstat (limited to 'src/mesa/pipe/cell/ppu')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_draw_arrays.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_draw_arrays.c b/src/mesa/pipe/cell/ppu/cell_draw_arrays.c
index 8286da712c4..9c41b4a523c 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 */