summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-19 08:35:53 -0600
committerBrian Paul <[email protected]>2010-04-19 08:35:53 -0600
commite3a34cc7f6c9f959cdc2af4486e84587fab4d0d7 (patch)
tree437667e2b7da27f03c190bee6b67bff260af0733 /src/gallium/drivers/svga
parentdb3b34219ef1dbf9ebf5e524d3e459f9ad9571b5 (diff)
gallium/draw: use correct rasterization state for wide/AA points/lines
When points or lines are decomposed into triangles, we need to be sure to disable polygon culling, stippling, "un-filled" modes, etc. This patch sets the rasterization state to disable those things prior to drawing points/lines with triangles, then restores the previous state afterward. The new piglit point-no-line-cull test checks this problem & solution.
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_rasterizer.c3
-rw-r--r--src/gallium/drivers/svga/svga_swtnl_draw.c2
-rw-r--r--src/gallium/drivers/svga/svga_swtnl_state.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
index 35717788677..5253c45cb20 100644
--- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c
+++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
@@ -222,7 +222,8 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe,
svga->curr.rast = raster;
- draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL);
+ draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL,
+ state);
svga->dirty |= SVGA_NEW_RAST;
}
diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c
index da15be155c8..0758f3ff72b 100644
--- a/src/gallium/drivers/svga/svga_swtnl_draw.c
+++ b/src/gallium/drivers/svga/svga_swtnl_draw.c
@@ -134,7 +134,7 @@ boolean svga_init_swtnl( struct svga_context *svga )
/*
* Create drawing context and plug our rendering stage into it.
*/
- svga->swtnl.draw = draw_create();
+ svga->swtnl.draw = draw_create(&svga->pipe);
if (svga->swtnl.draw == NULL)
goto fail;
diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c
index 35f36a828fd..6dfdb5e89be 100644
--- a/src/gallium/drivers/svga/svga_swtnl_state.c
+++ b/src/gallium/drivers/svga/svga_swtnl_state.c
@@ -113,7 +113,8 @@ static int update_swtnl_draw( struct svga_context *svga,
if (dirty & SVGA_NEW_RAST)
draw_set_rasterizer_state(svga->swtnl.draw,
- &svga->curr.rast->templ);
+ &svga->curr.rast->templ,
+ (void *) svga->curr.rast);
if (dirty & SVGA_NEW_FRAME_BUFFER)
draw_set_mrd(svga->swtnl.draw,