summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c9
-rw-r--r--src/mesa/state_tracker/st_context.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index e0215c9eefe..3e5410cfab2 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -201,6 +201,15 @@ update_blend( struct st_context *st )
st->state.blend = blend; /* struct copy */
st->pipe->set_blend_state(st->pipe, &blend); /* set new state */
}
+
+ if (memcmp(st->ctx->Color.BlendColor, &st->state.blend_color, 4 * sizeof(GLfloat)) != 0) {
+ /* state has changed */
+ st->state.blend_color.color[0] = st->ctx->Color.BlendColor[0];
+ st->state.blend_color.color[1] = st->ctx->Color.BlendColor[1];
+ st->state.blend_color.color[2] = st->ctx->Color.BlendColor[2];
+ st->state.blend_color.color[3] = st->ctx->Color.BlendColor[3];
+ st->pipe->set_blend_color(st->pipe, (struct pipe_blend_color *) st->ctx->Color.BlendColor);
+ }
}
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 3b47785a9a7..c1d868604cf 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -67,6 +67,7 @@ struct st_context
struct {
struct pipe_alpha_test_state alpha_test;
struct pipe_blend_state blend;
+ struct pipe_blend_color blend_color;
struct pipe_clear_color_state clear_color;
struct pipe_clip_state clip;
struct pipe_depth_state depth;