<p dir="ltr"></p>
<p dir="ltr">On Aug 12, 2016 8:13 PM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br>
><br>
> We'll do blending in the shader in this case, so just disable the<br>
> hardware blending.<br>
><br>
> Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
> ---<br>
> src/mesa/drivers/dri/i965/gen8_blend_state.c | 5 ++++-</p>
<p dir="ltr">Drive-by comment: why are you only doing this for gen8 when we're supporting the extension all the way back to gen4?</p>
<p dir="ltr">As a side-note, wouldn't it be nice if it were all in one file?...</p>
<p dir="ltr">> 1 file changed, 4 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/gen8_blend_state.c b/src/mesa/drivers/dri/i965/gen8_blend_state.c<br>
> index 99b5e34..f81e8ca 100644<br>
> --- a/src/mesa/drivers/dri/i965/gen8_blend_state.c<br>
> +++ b/src/mesa/drivers/dri/i965/gen8_blend_state.c<br>
> @@ -101,13 +101,16 @@ gen8_upload_blend_state(struct brw_context *brw)<br>
> */<br>
> bool integer = rb_type == GL_INT || rb_type == GL_UNSIGNED_INT;<br>
><br>
> + const bool blend_enable = (1 << i) &<br>
> + ctx->Color.BlendEnabled & ~ctx->Color._AdvancedBlendEnabled;<br>
> +<br>
> /* _NEW_COLOR */<br>
> if (ctx->Color.ColorLogicOpEnabled) {<br>
> blend[1 + 2*i+1] |=<br>
> GEN8_BLEND_LOGIC_OP_ENABLE |<br>
> SET_FIELD(intel_translate_logic_op(ctx->Color.LogicOp),<br>
> GEN8_BLEND_LOGIC_OP_FUNCTION);<br>
> - } else if (ctx->Color.BlendEnabled & (1 << i) && !integer) {<br>
> + } else if (blend_enable && !integer) {<br>
> GLenum eqRGB = ctx->Color.Blend[i].EquationRGB;<br>
> GLenum eqA = ctx->Color.Blend[i].EquationA;<br>
> GLenum srcRGB = ctx->Color.Blend[i].SrcRGB;<br>
> --<br>
> 2.9.0<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br></p>