From: Gert Wollny Date: Thu, 13 Sep 2018 08:06:45 +0000 (+0200) Subject: mesa/st: In the precense of integer buffers enable per buffer blending X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47a6f98e15b367a64cbf994f24c711aa42f7fcf6;p=mesa.git mesa/st: In the precense of integer buffers enable per buffer blending Since blending will be disabled later for integer formats we have to consider that in the case of a mixed set of integer/non-integer format buffers blending must be handled on a per buffer basis. Fixes on r600: dEQP-GLES31.functional.draw_buffers_indexed.random. max_required_draw_buffers.13 Fixes: 8fb966688bc1053a48e8ee7f7394ce030bcfd345 st/mesa: Disable blending for integer formats. Signed-off-by: Gert Wollny Reviewed-by: Marek Olšák --- diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index 804de2f154f..9f7f779289e 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -139,6 +139,12 @@ blend_per_rt(const struct gl_context *ctx, unsigned num_cb) /* this can only happen if GL_ARB_draw_buffers_blend is enabled */ return GL_TRUE; } + if (ctx->DrawBuffer->_IntegerBuffers && + (ctx->DrawBuffer->_IntegerBuffers != cb_mask)) { + /* If there is a mix of integer/non-integer buffers then blending + * must be handled on a per buffer basis. */ + return GL_TRUE; + } return GL_FALSE; }