From: Ilia Mirkin Date: Wed, 9 Nov 2016 19:31:25 +0000 (-0500) Subject: swr: correct setting of independentAlphaBlendEnable X-Git-Tag: upstream/17.1.0~4870 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=828faaef40f9bd50cb75c2cde0d9393bc3fb6695;p=platform%2Fupstream%2Fmesa.git swr: correct setting of independentAlphaBlendEnable This setting is for whether color and alpha have different blend settings, not for whether blending is enabled on a per-RT basis. Signed-off-by: Ilia Mirkin Reviewed-by: Tim Rowley --- diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index d19acfb..65327f3 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -1318,7 +1318,12 @@ swr_update_derived(struct pipe_context *pipe, compileState.desc.alphaTestEnable = ctx->depth_stencil->alpha.enabled; compileState.desc.independentAlphaBlendEnable = - ctx->blend->pipe.independent_blend_enable; + (compileState.blendState.sourceBlendFactor != + compileState.blendState.sourceAlphaBlendFactor) || + (compileState.blendState.destBlendFactor != + compileState.blendState.destAlphaBlendFactor) || + (compileState.blendState.colorBlendFunc != + compileState.blendState.alphaBlendFunc); compileState.desc.alphaToCoverageEnable = ctx->blend->pipe.alpha_to_coverage; compileState.desc.sampleMaskEnable = 0; // XXX