summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-21 16:56:32 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-21 16:56:32 -0700
commit446bfc32a83008e0865ec869bc80b920c907f10f (patch)
tree8d19dd335aa2bdbc5dcd51dd91d6f143bad8a662 /src/gallium/drivers/softpipe/sp_context.c
parenteb4dc2dd5ed62e6ccb55ccc2bc13f6a2f3fc1f76 (diff)
downloadexternal_mesa3d-446bfc32a83008e0865ec869bc80b920c907f10f.zip
external_mesa3d-446bfc32a83008e0865ec869bc80b920c907f10f.tar.gz
external_mesa3d-446bfc32a83008e0865ec869bc80b920c907f10f.tar.bz2
gallium: new draw stage for polygon stipple.
For hardware without native polygon stipple. Create a 32x32 alpha texture that encodes the stipple pattern. Modify the user's fragment program to sample the texture (with gl_FragCoord) and kill the fragment according to the texel value. Temporarily enabled in softpipe driver, replacing the sp_quad_stipple.c step.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index de4c6c1..2cdf3c7 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -332,6 +332,11 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
draw_install_aaline_stage(softpipe->draw, &softpipe->pipe);
draw_install_aapoint_stage(softpipe->draw, &softpipe->pipe);
+#if USE_DRAW_STAGE_PSTIPPLE
+ /* Do polygon stipple w/ texture map + frag prog? */
+ draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe);
+#endif
+
/* sp_prim_setup can do wide points (don't convert to quads) */
draw_convert_wide_points(softpipe->draw, FALSE);