cso: don't pass blend_color through cso_context

It's never saved or restored. Redundant state changes are already
filtered out by mesa/main.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>
This commit is contained in:
Marek Olšák 2020-12-03 13:38:34 -05:00 committed by Marge Bot
parent 912ba743b5
commit a35014954b
3 changed files with 2 additions and 16 deletions

View file

@ -123,7 +123,6 @@ struct cso_context {
struct pipe_framebuffer_state fb, fb_saved;
struct pipe_viewport_state vp, vp_saved;
struct pipe_blend_color blend_color;
unsigned sample_mask, sample_mask_saved;
unsigned min_samples, min_samples_saved;
struct pipe_stencil_ref stencil_ref, stencil_ref_saved;
@ -798,16 +797,6 @@ cso_restore_viewport(struct cso_context *ctx)
}
}
void cso_set_blend_color(struct cso_context *ctx,
const struct pipe_blend_color *bc)
{
if (memcmp(&ctx->blend_color, bc, sizeof(ctx->blend_color))) {
ctx->blend_color = *bc;
ctx->pipe->set_blend_color(ctx->pipe, bc);
}
}
void cso_set_sample_mask(struct cso_context *ctx, unsigned sample_mask)
{
if (ctx->sample_mask != sample_mask) {

View file

@ -120,10 +120,6 @@ void cso_set_viewport(struct cso_context *cso,
void cso_set_viewport_dims(struct cso_context *ctx,
float width, float height, boolean invert);
void cso_set_blend_color(struct cso_context *cso,
const struct pipe_blend_color *bc);
void cso_set_sample_mask(struct cso_context *cso, unsigned stencil_mask);
void cso_set_min_samples(struct cso_context *cso, unsigned min_samples);

View file

@ -303,8 +303,9 @@ st_update_blend( struct st_context *st )
void
st_update_blend_color(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
struct pipe_blend_color bc;
COPY_4FV(bc.color, st->ctx->Color.BlendColorUnclamped);
cso_set_blend_color(st->cso_context, &bc);
pipe->set_blend_color(pipe, &bc);
}