aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw/draw_vbuf.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-25 17:21:05 -0700
committerBrian <[email protected]>2008-01-25 17:22:56 -0700
commit1603a33fb276d7e78a2e872dfa05aa0093d1329a (patch)
treed293a1e1dbd7b05b80828a8f3303607567b59664 /src/mesa/pipe/draw/draw_vbuf.c
parent0bfd085e2866fbbd40209dcee23f0e6240583fe8 (diff)
gallium: better flush logic in draw module
This is the other half of Keith's draw/flush patch. There are now 5 flush flags to control what's flushed (post-xform vertex cache, prim cache, vbuf, etc). The gears slow-down in this part of the patch was due to the cull stage not getting invoked. It was unconditional before, but is now gated by 'need_det'. But it also needs to be gated by draw->rasterizer->cull_mode. Gears uses back-face culling.
Diffstat (limited to 'src/mesa/pipe/draw/draw_vbuf.c')
-rw-r--r--src/mesa/pipe/draw/draw_vbuf.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mesa/pipe/draw/draw_vbuf.c b/src/mesa/pipe/draw/draw_vbuf.c
index d827f51d567..cd0b4fbbb98 100644
--- a/src/mesa/pipe/draw/draw_vbuf.c
+++ b/src/mesa/pipe/draw/draw_vbuf.c
@@ -387,29 +387,26 @@ vbuf_alloc_vertices( struct draw_stage *stage,
}
-static void
-vbuf_begin( struct draw_stage *stage )
-{
- /* no-op, vbuffer allocated by first point/line/tri */
-}
-
static void
vbuf_flush( struct draw_stage *stage, unsigned flags )
{
-// vbuf_flush_indices( stage );
- /* XXX: Overkill */
- vbuf_flush_vertices( stage );
-
+ vbuf_flush_indices( stage );
+
stage->point = vbuf_first_point;
stage->line = vbuf_first_line;
stage->tri = vbuf_first_tri;
+
+ if (flags & DRAW_FLUSH_BACKEND)
+ vbuf_flush_vertices( stage );
}
static void
vbuf_reset_stipple_counter( struct draw_stage *stage )
{
+ /* XXX: Need to do something here for hardware with linestipple.
+ */
(void) stage;
}