diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_pipe.c | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 39296aa351f..9dcb5586c6e 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -93,6 +93,7 @@ softpipe_destroy( struct pipe_context *pipe ) softpipe->quad.shade->destroy( softpipe->quad.shade ); softpipe->quad.depth_test->destroy( softpipe->quad.depth_test ); softpipe->quad.blend->destroy( softpipe->quad.blend ); + softpipe->quad.pstipple->destroy( softpipe->quad.pstipple ); for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { sp_destroy_tile_cache(softpipe->cbuf_cache[i]); @@ -296,6 +297,7 @@ softpipe_create_context( struct pipe_screen *screen, softpipe->quad.shade = sp_quad_shade_stage(softpipe); softpipe->quad.depth_test = sp_quad_depth_test_stage(softpipe); softpipe->quad.blend = sp_quad_blend_stage(softpipe); + softpipe->quad.pstipple = sp_quad_polygon_stipple_stage(softpipe); /* @@ -330,7 +332,9 @@ softpipe_create_context( struct pipe_screen *screen, draw_install_aapoint_stage(softpipe->draw, &softpipe->pipe); /* Do polygon stipple w/ texture map + frag prog? */ +#if DO_PSTIPPLE_IN_DRAW_MODULE draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe); +#endif sp_init_surface_functions(softpipe); diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index be8f2cb3e04..92607874b60 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -38,6 +38,10 @@ #include "sp_quad_pipe.h" +/** Do polygon stipple in the driver here, or in the draw module? */ +#define DO_PSTIPPLE_IN_DRAW_MODULE 1 + + struct softpipe_vbuf_render; struct draw_context; struct draw_stage; @@ -126,6 +130,7 @@ struct softpipe_context { struct quad_stage *shade; struct quad_stage *depth_test; struct quad_stage *blend; + struct quad_stage *pstipple; struct quad_stage *first; /**< points to one of the above stages */ } quad; diff --git a/src/gallium/drivers/softpipe/sp_quad_pipe.c b/src/gallium/drivers/softpipe/sp_quad_pipe.c index 1b5bab4eca6..43b8e88e334 100644 --- a/src/gallium/drivers/softpipe/sp_quad_pipe.c +++ b/src/gallium/drivers/softpipe/sp_quad_pipe.c @@ -59,5 +59,10 @@ sp_build_quad_pipeline(struct softpipe_context *sp) sp_push_quad_first( sp, sp->quad.depth_test ); sp_push_quad_first( sp, sp->quad.shade ); } + +#if !DO_PSTIPPLE_IN_DRAW_MODULE + if (sp->rasterizer->poly_stipple_enable) + sp_push_quad_first( sp, sp->quad.pstipple ); +#endif } |