nv10: set rasterizer state.
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>
Wed, 2 Apr 2008 13:09:32 +0000 (15:09 +0200)
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>
Wed, 2 Apr 2008 13:09:32 +0000 (15:09 +0200)
src/gallium/drivers/nv10/nv10_state.c
src/gallium/drivers/nv10/nv10_state.h

index 12722709f6baae03f674c62b5e6cdd41efcbe398..182f6857f5b274263ec645d1a26b877e841ef55f 100644 (file)
@@ -282,6 +282,8 @@ nv10_rasterizer_state_create(struct pipe_context *pipe,
         */
        rs = malloc(sizeof(struct nv10_rasterizer_state));
 
+       rs->templ = cso;
+       
        rs->shade_model = cso->flatshade ? 0x1d00 : 0x1d01;
 
        rs->line_width = (unsigned char)(cso->line_width * 8.0) & 0xff;
@@ -347,6 +349,8 @@ nv10_rasterizer_state_bind(struct pipe_context *pipe, void *rast)
 
        nv10->rast = (struct nv10_rasterizer_state*)rast;
 
+       draw_set_rasterizer_state(nv10->draw, (nv10->rast ? nv10->rast->templ : NULL));
+
        nv10->dirty |= NV10_NEW_RAST;
 }
 
index 9bda8a7d6a39446b3371d195ad45f2843d810fae..3ca501d135641e2c60e43d8850fdf927c6939c97 100644 (file)
@@ -39,6 +39,8 @@ struct nv10_rasterizer_state {
        uint32_t cull_face_en;
 
        uint32_t point_sprite;
+
+       const struct pipe_rasterizer_state *templ;
 };
 
 struct nv10_vertex_program_exec {