aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-06-28 08:24:11 -0700
committerKenneth Graunke <[email protected]>2016-08-25 19:22:10 -0700
commit40241d40d0a481f9f1cd112d2d48dadf1ec6ad0f (patch)
tree1e4b7f24b2981761926c845e51f8dfa2c1c196dc /src
parent8ab50f5dd14fb720316e65d9553e7cad5c50bf87 (diff)
i965: Disable hardware blending if advanced blending is in use.
We'll do blending in the shader in this case, so just disable the hardware blending. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen6_cc.c3
-rw-r--r--src/mesa/drivers/dri/i965/gen8_blend_state.c3
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 2e8f0f79e3d..5c58b448c1f 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -159,7 +159,7 @@ static void upload_cc_unit(struct brw_context *brw)
if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) {
cc->cc2.logicop_enable = 1;
cc->cc5.logicop_func = intel_translate_logic_op(ctx->Color.LogicOp);
- } else if (ctx->Color.BlendEnabled) {
+ } else if (ctx->Color.BlendEnabled && !ctx->Color._AdvancedBlendMode) {
GLenum eqRGB = ctx->Color.Blend[0].EquationRGB;
GLenum eqA = ctx->Color.Blend[0].EquationA;
GLenum srcRGB = ctx->Color.Blend[0].SrcRGB;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index e07e8dacace..023b1ffbf9d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -926,8 +926,8 @@ gen4_update_renderbuffer_surface(struct brw_context *brw,
if (brw->gen < 6) {
/* _NEW_COLOR */
- if (!ctx->Color.ColorLogicOpEnabled &&
- (ctx->Color.BlendEnabled & (1 << unit)))
+ if (!ctx->Color.ColorLogicOpEnabled && !ctx->Color._AdvancedBlendMode &&
+ (ctx->Color.BlendEnabled & (1 << unit)))
surf[0] |= BRW_SURFACE_BLEND_ENABLED;
if (!ctx->Color.ColorMask[unit][0])
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index 69c8ebd0dfb..0c38930ec2b 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -104,7 +104,8 @@ gen6_upload_blend_state(struct brw_context *brw)
blend[b].blend1.logic_op_func =
intel_translate_logic_op(ctx->Color.LogicOp);
}
- } else if (ctx->Color.BlendEnabled & (1 << b) && !integer) {
+ } else if (ctx->Color.BlendEnabled & (1 << b) && !integer &&
+ !ctx->Color._AdvancedBlendMode) {
GLenum eqRGB = ctx->Color.Blend[b].EquationRGB;
GLenum eqA = ctx->Color.Blend[b].EquationA;
GLenum srcRGB = ctx->Color.Blend[b].SrcRGB;
diff --git a/src/mesa/drivers/dri/i965/gen8_blend_state.c b/src/mesa/drivers/dri/i965/gen8_blend_state.c
index 99b5e342d63..4935d82af62 100644
--- a/src/mesa/drivers/dri/i965/gen8_blend_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_blend_state.c
@@ -107,7 +107,8 @@ gen8_upload_blend_state(struct brw_context *brw)
GEN8_BLEND_LOGIC_OP_ENABLE |
SET_FIELD(intel_translate_logic_op(ctx->Color.LogicOp),
GEN8_BLEND_LOGIC_OP_FUNCTION);
- } else if (ctx->Color.BlendEnabled & (1 << i) && !integer) {
+ } else if (ctx->Color.BlendEnabled & (1 << i) && !integer &&
+ !ctx->Color._AdvancedBlendMode) {
GLenum eqRGB = ctx->Color.Blend[i].EquationRGB;
GLenum eqA = ctx->Color.Blend[i].EquationA;
GLenum srcRGB = ctx->Color.Blend[i].SrcRGB;