summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_cull.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/draw/draw_cull.c')
-rw-r--r--src/mesa/pipe/draw/draw_cull.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/mesa/pipe/draw/draw_cull.c b/src/mesa/pipe/draw/draw_cull.c
index 9bd53f45f2..05c274e4dc 100644
--- a/src/mesa/pipe/draw/draw_cull.c
+++ b/src/mesa/pipe/draw/draw_cull.c
@@ -50,14 +50,6 @@ static INLINE struct cull_stage *cull_stage( struct draw_stage *stage )
}
-static void cull_begin( struct draw_stage *stage )
-{
- struct cull_stage *cull = cull_stage(stage);
-
- cull->winding = stage->draw->rasterizer->cull_mode;
-
- stage->next->begin( stage->next );
-}
static void cull_tri( struct draw_stage *stage,
@@ -90,6 +82,18 @@ static void cull_tri( struct draw_stage *stage,
}
}
+static void cull_first_tri( struct draw_stage *stage,
+ struct prim_header *header )
+{
+ struct cull_stage *cull = cull_stage(stage);
+
+ cull->winding = stage->draw->rasterizer->cull_mode;
+
+ stage->tri = cull_tri;
+ stage->tri( stage, header );
+}
+
+
static void cull_line( struct draw_stage *stage,
struct prim_header *header )
@@ -105,12 +109,12 @@ static void cull_point( struct draw_stage *stage,
}
-static void cull_end( struct draw_stage *stage )
+static void cull_flush( struct draw_stage *stage, unsigned flags )
{
- stage->next->end( stage->next );
+ stage->tri = cull_first_tri;
+ stage->next->flush( stage->next, flags );
}
-
static void cull_reset_stipple_counter( struct draw_stage *stage )
{
stage->next->reset_stipple_counter( stage->next );
@@ -135,11 +139,10 @@ struct draw_stage *draw_cull_stage( struct draw_context *draw )
cull->stage.draw = draw;
cull->stage.next = NULL;
- cull->stage.begin = cull_begin;
cull->stage.point = cull_point;
cull->stage.line = cull_line;
- cull->stage.tri = cull_tri;
- cull->stage.end = cull_end;
+ cull->stage.tri = cull_first_tri;
+ cull->stage.flush = cull_flush;
cull->stage.reset_stipple_counter = cull_reset_stipple_counter;
cull->stage.destroy = cull_destroy;