From 36057ff12a148f401490f82fce8c6670cadb039e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 9 Aug 2016 13:26:23 +0200 Subject: [PATCH] radeonsi: disallow MIN/MAX blend equations for dual source blending MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Edward O'Callaghan --- src/gallium/drivers/radeonsi/si_state.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.30.2