plug the wide prims code into the pipeline
authorBrian <brian.paul@tungstengraphics.com>
Mon, 22 Oct 2007 17:01:34 +0000 (11:01 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 22 Oct 2007 17:01:34 +0000 (11:01 -0600)
src/mesa/pipe/draw/draw_context.c
src/mesa/pipe/draw/draw_private.h
src/mesa/pipe/draw/draw_validate.c
src/mesa/sources

index d2015bd514661b57dbae6e3a0b126dd8e9a19a5a..544c423c2d3aa43aa75e14e0c220e7e7ec4e9ecc 100644 (file)
@@ -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 );
index 6aa4cd44a0b0c76f4c000ada110554d4ec71fb3f..7e5d5db5ab911576e620cf337920cc03d2a77ed9 100644 (file)
@@ -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 );
 
 
index 7c5a9dcecadb0e3cfc846e5c5d0aba0959152190..5ec581d8b33581ee569a4ee9c4a6dd8aadc7d571 100644 (file)
@@ -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;
index d53e75c820b1a253d6ff60ef230794a219f20aac..fea3234db3a7d41515e4c095ae647ecbf96f9f79 100644 (file)
@@ -166,12 +166,13 @@ DRAW_SOURCES = \
        pipe/draw/draw_offset.c \
        pipe/draw/draw_prim.c \
        pipe/draw/draw_twoside.c \
+       pipe/draw/draw_unfilled.c \
        pipe/draw/draw_validate.c \
        pipe/draw/draw_vertex.c \
        pipe/draw/draw_vertex_cache.c \
        pipe/draw/draw_vertex_fetch.c \
        pipe/draw/draw_vertex_shader.c \
-       pipe/draw/draw_unfilled.c
+       pipe/draw/draw_wide_prims.c
 
 TGSIEXEC_SOURCES = \
        pipe/tgsi/exec/tgsi_build.c \