diff options
author | Michal Krol <michal@tungstengraphics.com> | 2008-03-30 23:21:20 +0200 |
---|---|---|
committer | Michal Krol <michal@tungstengraphics.com> | 2008-03-30 23:21:20 +0200 |
commit | 63950b11b6060e4e0d06e0d14548ff132a295067 (patch) | |
tree | 53848ae0dff0734a18f5c094aa892491f9429bd7 /src | |
parent | fc9888014470286d8d651c569aaadf9cd69d8282 (diff) |
draw: Do not run full pipeline when flatshade_first for point primitives.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_prim.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_validate.c | 8 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_prim.c b/src/gallium/auxiliary/draw/draw_prim.c index 404c28d76a..ddcde01d9a 100644 --- a/src/gallium/auxiliary/draw/draw_prim.c +++ b/src/gallium/auxiliary/draw/draw_prim.c @@ -594,7 +594,6 @@ draw_arrays(struct draw_context *draw, unsigned prim, /* drawing done here: */ if (!draw->rasterizer->bypass_vs || - (draw->rasterizer->flatshade && draw->rasterizer->flatshade_first) || !draw_pt_arrays(draw, prim, start, count)) { /* we have to run the whole pipeline */ draw_prim(draw, prim, start, count); diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index 3ec31ec25f..fc9304197a 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -36,6 +36,9 @@ #include "draw/draw_pt.h" +/* XXX: Shouldn't those two functions below use the '>' operator??? + */ + static boolean too_many_verts( struct draw_context *draw, unsigned verts ) { diff --git a/src/gallium/auxiliary/draw/draw_validate.c b/src/gallium/auxiliary/draw/draw_validate.c index e163e078f0..ad43f06f73 100644 --- a/src/gallium/auxiliary/draw/draw_validate.c +++ b/src/gallium/auxiliary/draw/draw_validate.c @@ -76,6 +76,10 @@ draw_need_pipeline(const struct draw_context *draw, /* AA lines */ if (draw->rasterizer->line_smooth && draw->pipeline.aaline) return TRUE; + + /* first-vertex driven flatshading */ + if (draw->rasterizer->flatshade && draw->rasterizer->flatshade_first) + return TRUE; } if (points(prim)) @@ -112,6 +116,10 @@ draw_need_pipeline(const struct draw_context *draw, /* two-side lighting */ if (draw->rasterizer->light_twoside) return TRUE; + + /* first-vertex driven flatshading */ + if (draw->rasterizer->flatshade && draw->rasterizer->flatshade_first) + return TRUE; } /* polygon cull - this is difficult - hardware can cull just fine |