From: Marek Olšák Date: Tue, 9 Aug 2016 11:26:23 +0000 (+0200) Subject: radeonsi: disallow MIN/MAX blend equations for dual source blending X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36057ff12a148f401490f82fce8c6670cadb039e;p=mesa.git radeonsi: disallow MIN/MAX blend equations for dual source blending Reviewed-by: Michel Dänzer Reviewed-by: Edward O'Callaghan --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f5b2330d623..8f7203ea9ba 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -464,6 +464,16 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx, if (i >= 1 && blend->dual_src_blend) continue; + /* Only addition and subtraction equations are supported with + * dual source blending. + */ + if (blend->dual_src_blend && + (eqRGB == PIPE_BLEND_MIN || eqRGB == PIPE_BLEND_MAX || + eqA == PIPE_BLEND_MIN || eqA == PIPE_BLEND_MAX)) { + assert(!"Unsupported equation for dual source blending"); + continue; + } + if (!state->rt[j].colormask) continue;