diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-06-26 17:35:24 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-06-26 17:35:24 -0600 |
commit | 1be17dc446aa6b0770d76a3eccf79d0faf6608c0 (patch) | |
tree | 1640f73391022164f3b348013ae279324ecce2fc /src/mesa/state_tracker | |
parent | 192f9ab81b3e2c88812f540c7a5c820e3783ff8a (diff) |
consolidate point/line state into pipe_setup_state
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom.c | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom.h | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_setup.c | 28 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 1 |
4 files changed, 21 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index 5fcd9d7af5..88c6c776a3 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -47,7 +47,6 @@ static const struct st_tracked_state *atoms[] = &st_update_depth, &st_update_clip, &st_update_fs, - &st_update_point, &st_update_setup, &st_update_viewport, &st_update_scissor, diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h index 8c1219fefd..7ea3301ea5 100644 --- a/src/mesa/state_tracker/st_atom.h +++ b/src/mesa/state_tracker/st_atom.h @@ -49,7 +49,6 @@ const struct st_tracked_state st_update_clip; const struct st_tracked_state st_update_clear_color; const struct st_tracked_state st_update_depth; const struct st_tracked_state st_update_fs; -const struct st_tracked_state st_update_point; const struct st_tracked_state st_update_setup; const struct st_tracked_state st_update_viewport; const struct st_tracked_state st_update_constants; diff --git a/src/mesa/state_tracker/st_atom_setup.c b/src/mesa/state_tracker/st_atom_setup.c index fcda2b3a41..23adf0b7c8 100644 --- a/src/mesa/state_tracker/st_atom_setup.c +++ b/src/mesa/state_tracker/st_atom_setup.c @@ -101,12 +101,6 @@ static void update_setup_state( struct st_context *st ) ctx->Light.Model.TwoSide) setup.light_twoside = 1; - if (ctx->Polygon.SmoothFlag) - setup.poly_smooth = 1; - - if (ctx->Polygon.StippleFlag) - setup.poly_stipple = 1; - /* _NEW_POLYGON */ if (ctx->Polygon.CullFlag) { @@ -158,6 +152,12 @@ static void update_setup_state( struct st_context *st ) if (setup.fill_ccw != PIPE_POLYGON_MODE_FILL) setup.offset_ccw = get_offset_flag( setup.fill_ccw, &ctx->Polygon ); + if (ctx->Polygon.SmoothFlag) + setup.poly_smooth = 1; + + if (ctx->Polygon.StippleFlag) + setup.poly_stipple_enable = 1; + /* _NEW_BUFFERS, _NEW_POLYGON */ @@ -173,6 +173,19 @@ static void update_setup_state( struct st_context *st ) st->polygon_offset_scale); } + /* _NEW_POINT + */ + setup.point_size = ctx->Point.Size; + setup.point_smooth = ctx->Point.SmoothFlag; + + /* _NEW_LINE + */ + setup.line_width = ctx->Line.Width; + setup.line_smooth = ctx->Line.SmoothFlag; + setup.line_stipple_enable = ctx->Line.StippleFlag; + setup.line_stipple_pattern = ctx->Line.StipplePattern; + setup.line_stipple_factor = ctx->Line.StippleFactor; + if (memcmp(&setup, &st->state.setup, sizeof(setup)) != 0) { st->state.setup = setup; @@ -182,7 +195,8 @@ static void update_setup_state( struct st_context *st ) const struct st_tracked_state st_update_setup = { .dirty = { - .mesa = (_NEW_LIGHT | _NEW_POLYGON | _NEW_BUFFERS), + .mesa = (_NEW_LIGHT | _NEW_POLYGON | _NEW_LINE | + _NEW_POINT | _NEW_BUFFERS), .st = 0, }, .update = update_setup_state diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 582d586a73..48ea7f12ee 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -74,7 +74,6 @@ struct st_context struct pipe_clear_color_state clear_color; struct pipe_clip_state clip; struct pipe_depth_state depth; - struct pipe_point_state point; struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS]; struct pipe_scissor_rect scissor; struct pipe_poly_stipple poly_stipple; |