Commit 1c818fff authored by Marek Olšák's avatar Marek Olšák

st/mesa: move blend color into its own state atom

This is now sensible thanks to the NewBlendColor flag.
Reviewed-by: Timothy Arceri's avatarTimothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
parent 0b03d82f
......@@ -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);
}
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment