diff options
author | Roland Scheidegger <[email protected]> | 2010-02-09 19:32:21 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-02-09 19:32:21 +0100 |
commit | 653a83445f94620673f747a4ace6847a2c7fdb4d (patch) | |
tree | e2c6814da8d809813daffce530b37f3d283e96ff /src/gallium/drivers/i965 | |
parent | b0613d87672ea08bb3b9cd56dee714fe413b670e (diff) | |
parent | dd7be07c9685012b3e9fdfbaa13dc638abf6a9d1 (diff) |
Merge branch 'gallium-nopointsizeminmax'
Conflicts:
src/gallium/drivers/nv10/nv10_state.c
src/gallium/drivers/nv20/nv20_state.c
src/gallium/drivers/nv50/nv50_program.c
Diffstat (limited to 'src/gallium/drivers/i965')
-rw-r--r-- | src/gallium/drivers/i965/brw_sf.c | 17 | ||||
-rw-r--r-- | src/gallium/drivers/i965/brw_sf_state.c | 6 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/gallium/drivers/i965/brw_sf.c b/src/gallium/drivers/i965/brw_sf.c index 6e99eaa09d8..9cceb4dbe52 100644 --- a/src/gallium/drivers/i965/brw_sf.c +++ b/src/gallium/drivers/i965/brw_sf.c @@ -127,6 +127,7 @@ static enum pipe_error compile_sf_prog( struct brw_context *brw, static enum pipe_error upload_sf_prog(struct brw_context *brw) { const struct brw_fs_signature *sig = &brw->curr.fragment_shader->signature; + const struct pipe_rasterizer_state *rast = &brw->curr.rast->templ; struct brw_sf_prog_key key; enum pipe_error ret; unsigned i; @@ -165,8 +166,8 @@ static enum pipe_error upload_sf_prog(struct brw_context *brw) case PIPE_PRIM_TRIANGLES: /* PIPE_NEW_RAST */ - if (brw->curr.rast->templ.fill_cw != PIPE_POLYGON_MODE_FILL || - brw->curr.rast->templ.fill_ccw != PIPE_POLYGON_MODE_FILL) + if (rast->fill_cw != PIPE_POLYGON_MODE_FILL || + rast->fill_ccw != PIPE_POLYGON_MODE_FILL) key.primitive = SF_UNFILLED_TRIS; else key.primitive = SF_TRIANGLES; @@ -179,14 +180,14 @@ static enum pipe_error upload_sf_prog(struct brw_context *brw) break; } - key.do_point_sprite = brw->curr.rast->templ.point_sprite; - key.sprite_origin_lower_left = 0; /* XXX: ctx->Point.SpriteOrigin - fix rast state */ - key.do_flat_shading = brw->curr.rast->templ.flatshade; - key.do_twoside_color = brw->curr.rast->templ.light_twoside; + key.do_point_sprite = rast->sprite_coord_enable ? 1 : 0; + key.sprite_origin_lower_left = (rast->sprite_coord_mode == PIPE_SPRITE_COORD_LOWER_LEFT); + key.point_coord_replace_attrs = rast->sprite_coord_enable; + key.do_flat_shading = rast->flatshade; + key.do_twoside_color = rast->light_twoside; if (key.do_twoside_color) { - key.frontface_ccw = (brw->curr.rast->templ.front_winding == - PIPE_WINDING_CCW); + key.frontface_ccw = (rast->front_winding == PIPE_WINDING_CCW); } if (brw_search_cache(&brw->cache, BRW_SF_PROG, diff --git a/src/gallium/drivers/i965/brw_sf_state.c b/src/gallium/drivers/i965/brw_sf_state.c index 25dc2b52e07..0ad91e03072 100644 --- a/src/gallium/drivers/i965/brw_sf_state.c +++ b/src/gallium/drivers/i965/brw_sf_state.c @@ -123,12 +123,10 @@ sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key) key->line_last_pixel_enable = rast->line_last_pixel; key->gl_rasterization_rules = rast->gl_rasterization_rules; - key->point_sprite = rast->point_sprite; + key->point_sprite = rast->sprite_coord_enable ? 1 : 0; key->point_attenuated = rast->point_size_per_vertex; - key->point_size = CLAMP(rast->point_size, - rast->point_size_min, - rast->point_size_max); + key->point_size = rast->point_size; } static enum pipe_error |