nv10: set rasterizer state.

This commit is contained in:
Stephane Marchesin 2008-04-02 15:09:32 +02:00
parent 81f34e222a
commit 8f26e975ca
2 changed files with 6 additions and 0 deletions

View 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;
}

View 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 {