diff options
author | Marek Olšák <[email protected]> | 2017-06-10 19:36:11 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | 1c818fff0cbce5fce1d3d1b6cd273797e6fa80d6 (patch) | |
tree | 262a0d7f17b0ac679cc477b0d19194ad1f6f0d51 /src/mesa | |
parent | 0b03d82f9c8041043be0928f557a16ec0fcd1c7d (diff) |
st/mesa: move blend color into its own state atom
This is now sensible thanks to the NewBlendColor flag.
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_blend.c | 13 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_list.h | 1 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index 43b16f8905d..103c5008029 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -276,10 +276,13 @@ st_update_blend( struct st_context *st ) } cso_set_blend(st->cso_context, blend); +} - { - struct pipe_blend_color bc; - COPY_4FV(bc.color, ctx->Color.BlendColorUnclamped); - cso_set_blend_color(st->cso_context, &bc); - } +void +st_update_blend_color(struct st_context *st) +{ + struct pipe_blend_color bc; + + COPY_4FV(bc.color, st->ctx->Color.BlendColorUnclamped); + cso_set_blend_color(st->cso_context, &bc); } diff --git a/src/mesa/state_tracker/st_atom_list.h b/src/mesa/state_tracker/st_atom_list.h index 614ee9006e8..81a93082a03 100644 --- a/src/mesa/state_tracker/st_atom_list.h +++ b/src/mesa/state_tracker/st_atom_list.h @@ -14,6 +14,7 @@ ST_STATE(ST_NEW_VIEWPORT, st_update_viewport) ST_STATE(ST_NEW_SCISSOR, st_update_scissor) ST_STATE(ST_NEW_WINDOW_RECTANGLES, st_update_window_rectangles) ST_STATE(ST_NEW_BLEND, st_update_blend) +ST_STATE(ST_NEW_BLEND_COLOR, st_update_blend_color) ST_STATE(ST_NEW_VS_SAMPLER_VIEWS, st_update_vertex_textures) ST_STATE(ST_NEW_FS_SAMPLER_VIEWS, st_update_fragment_textures) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 18f202632a8..f57cd6a4256 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -503,7 +503,7 @@ static void st_init_driver_flags(struct st_context *st) f->NewScissorTest = ST_NEW_SCISSOR | ST_NEW_RASTERIZER; f->NewAlphaTest = ST_NEW_DSA; f->NewBlend = ST_NEW_BLEND; - f->NewBlendColor = ST_NEW_BLEND; /* TODO: add an atom for blend color */ + f->NewBlendColor = ST_NEW_BLEND_COLOR; f->NewColorMask = ST_NEW_BLEND; f->NewDepth = ST_NEW_DSA; f->NewLogicOp = ST_NEW_BLEND; |