From 527a74cb5d7cc700d0e089f1f042f2b49d211a54 Mon Sep 17 00:00:00 2001 From: Amber Date: Tue, 7 Feb 2023 11:53:01 +0100 Subject: [PATCH] gallium: make BlendCoherent usable from gallium drivers Signed-off-by: Amber Amber Part-of: --- src/gallium/include/pipe/p_state.h | 1 + src/mesa/state_tracker/st_atom_blend.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 5194011..037644d 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -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]; }; diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index edd6a3c..a78a1c2 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -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; -- 2.7.4