From 3e9b1bc1009ca1a2923f844d00bf478dc9d24644 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 23 Mar 2008 21:54:44 +0000 Subject: draw: tweak the definition of draw_need_pipeline, fix minor bug --- src/gallium/auxiliary/draw/draw_validate.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/gallium/auxiliary/draw') diff --git a/src/gallium/auxiliary/draw/draw_validate.c b/src/gallium/auxiliary/draw/draw_validate.c index 33e5559508..70b477ba5c 100644 --- a/src/gallium/auxiliary/draw/draw_validate.c +++ b/src/gallium/auxiliary/draw/draw_validate.c @@ -34,20 +34,14 @@ /** - * Check if we need any special pipeline stages, or whether prims/verts - * can go through untouched. + * Check if we need any special pipeline stages, or whether + * prims/verts can go through untouched. Don't test for bypass + * clipping or vs modes, this function is just about the primitive + * pipeline stages. */ boolean draw_need_pipeline(const struct draw_context *draw) { - /* clipping */ - if (!draw->rasterizer->bypass_clipping) - return TRUE; - - /* vertex shader */ - if (!draw->rasterizer->bypass_vs) - return TRUE; - /* line stipple */ if (draw->rasterizer->line_stipple_enable && draw->line_stipple) return TRUE; @@ -72,6 +66,11 @@ draw_need_pipeline(const struct draw_context *draw) if (draw->rasterizer->poly_stipple_enable && draw->pipeline.pstipple) return TRUE; + /* unfilled polygons */ + if (draw->rasterizer->fill_cw != PIPE_POLYGON_MODE_FILL || + draw->rasterizer->fill_ccw != PIPE_POLYGON_MODE_FILL) + return TRUE; + /* polygon offset */ if (draw->rasterizer->offset_cw || draw->rasterizer->offset_ccw) return TRUE; @@ -84,9 +83,14 @@ draw_need_pipeline(const struct draw_context *draw) if (draw->rasterizer->light_twoside) return TRUE; - /* polygon cull */ + /* polygon cull - this is difficult - hardware can cull just fine + * most of the time (though sometimes CULL_NEITHER is unsupported. + * + * Generally this isn't a reason to require the pipeline, though. + * if (draw->rasterizer->cull_mode) return TRUE; + */ return FALSE; } -- cgit v1.2.3