summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-22 11:01:34 -0600
committerBrian <[email protected]>2007-10-22 11:01:34 -0600
commite3444deec5a369e4ffabfeb9f6c257dd6b8e5a30 (patch)
treed13e8fc858073538175ec6df94af2e1cffe38cf9 /src/mesa/pipe/draw
parent80d2bb7c643092e489dba77e4bd02a8684fcc42b (diff)
plug the wide prims code into the pipeline
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_context.c1
-rw-r--r--src/mesa/pipe/draw/draw_private.h2
-rw-r--r--src/mesa/pipe/draw/draw_validate.c6
3 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c
index d2015bd5146..544c423c2d3 100644
--- a/src/mesa/pipe/draw/draw_context.c
+++ b/src/mesa/pipe/draw/draw_context.c
@@ -48,6 +48,7 @@ struct draw_context *draw_create( void )
#endif
/* create pipeline stages */
+ draw->pipeline.wide = draw_wide_stage( draw );
draw->pipeline.unfilled = draw_unfilled_stage( draw );
draw->pipeline.twoside = draw_twoside_stage( draw );
draw->pipeline.offset = draw_offset_stage( draw );
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 6aa4cd44a0b..7e5d5db5ab9 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -145,6 +145,7 @@ struct draw_context
struct draw_stage *twoside;
struct draw_stage *offset;
struct draw_stage *unfilled;
+ struct draw_stage *wide;
struct draw_stage *rasterize;
} pipeline;
@@ -233,6 +234,7 @@ extern struct draw_stage *draw_offset_stage( struct draw_context *context );
extern struct draw_stage *draw_clip_stage( struct draw_context *context );
extern struct draw_stage *draw_flatshade_stage( struct draw_context *context );
extern struct draw_stage *draw_cull_stage( struct draw_context *context );
+extern struct draw_stage *draw_wide_stage( struct draw_context *context );
extern struct draw_stage *draw_validate_stage( struct draw_context *context );
diff --git a/src/mesa/pipe/draw/draw_validate.c b/src/mesa/pipe/draw/draw_validate.c
index 7c5a9dcecad..5ec581d8b33 100644
--- a/src/mesa/pipe/draw/draw_validate.c
+++ b/src/mesa/pipe/draw/draw_validate.c
@@ -51,6 +51,12 @@ static void validate_begin( struct draw_stage *stage )
* shorter pipelines for lines & points.
*/
+ if (draw->rasterizer->line_width != 1.0 ||
+ draw->rasterizer->point_size != 1.0) {
+ draw->pipeline.wide->next = next;
+ next = draw->pipeline.wide;
+ }
+
if (draw->rasterizer->fill_cw != PIPE_POLYGON_MODE_FILL ||
draw->rasterizer->fill_ccw != PIPE_POLYGON_MODE_FILL) {
draw->pipeline.unfilled->next = next;