svga: fix the rasterizer state resets

draw module calls back into the driver and sets certain parts
of the state to whatever it needs, unfortunately unless you
get the ordering of calls to draw just right you'll end up
reseting your own driver state. That's what was happening to us
draw module would under certain conditions reset our own driver
state.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Zack Rusin
2012-03-02 20:13:38 -05:00
parent d249bd9cbd
commit 831de96db8
2 changed files with 17 additions and 2 deletions

View File

@@ -237,11 +237,11 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe,
struct svga_context *svga = svga_context(pipe);
struct svga_rasterizer_state *raster = (struct svga_rasterizer_state *)state;
svga->curr.rast = raster;
draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL,
state);
svga->curr.rast = raster;
svga->dirty |= SVGA_NEW_RAST;
}