gallium: make BlendCoherent usable from gallium drivers

Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21161>
This commit is contained in:
Amber 2023-02-07 11:53:01 +01:00 committed by Marge Bot
parent 40bdd2bbf7
commit 527a74cb5d
2 changed files with 5 additions and 0 deletions

View file

@ -376,6 +376,7 @@ struct pipe_blend_state
unsigned alpha_to_one:1;
unsigned max_rt:3; /* index of max rt, Ie. # of cbufs minus 1 */
unsigned advanced_blend_func:4;
unsigned blend_coherent:1;
struct pipe_rt_blend_state rt[PIPE_MAX_COLOR_BUFS];
};

View file

@ -263,6 +263,10 @@ st_update_blend( struct st_context *st )
blend->rt[i].colormask = colormask;
}
if (ctx->Color._AdvancedBlendMode != BLEND_NONE) {
blend->blend_coherent = ctx->Color.BlendCoherent;
}
if (ctx->Color.ColorLogicOpEnabled) {
/* logicop enabled */
blend->logicop_enable = 1;