mesa: treat Color._AdvancedBlendMode as enum
Signed-off-by: Elie Tournier <elie.tournier@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>
This commit is contained in:
committed by
Marge Bot
parent
6ffa0e9254
commit
30f4ccff5b
@@ -978,7 +978,8 @@ gen4_update_renderbuffer_surface(struct brw_context *brw,
|
||||
|
||||
if (devinfo->gen < 6) {
|
||||
/* _NEW_COLOR */
|
||||
if (!ctx->Color.ColorLogicOpEnabled && !ctx->Color._AdvancedBlendMode &&
|
||||
if (!ctx->Color.ColorLogicOpEnabled &&
|
||||
ctx->Color._AdvancedBlendMode == BLEND_NONE &&
|
||||
(ctx->Color.BlendEnabled & (1 << unit)))
|
||||
surf[0] |= BRW_SURFACE_BLEND_ENABLED;
|
||||
|
||||
|
||||
@@ -2843,7 +2843,8 @@ set_blend_entry_bits(struct brw_context *brw, BLEND_ENTRY_GENXML *entry, int i,
|
||||
entry->LogicOpEnable = true;
|
||||
entry->LogicOpFunction = ctx->Color._LogicOp;
|
||||
}
|
||||
} else if (blend_enabled && !ctx->Color._AdvancedBlendMode
|
||||
} else if (blend_enabled &&
|
||||
ctx->Color._AdvancedBlendMode == BLEND_NONE
|
||||
&& (GEN_GEN <= 5 || !integer)) {
|
||||
GLenum eqRGB = ctx->Color.Blend[i].EquationRGB;
|
||||
GLenum eqA = ctx->Color.Blend[i].EquationA;
|
||||
|
||||
@@ -60,7 +60,8 @@ check_blend_func_error(struct gl_context *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->Color.BlendEnabled && ctx->Color._AdvancedBlendMode) {
|
||||
if (ctx->Color.BlendEnabled &&
|
||||
ctx->Color._AdvancedBlendMode != BLEND_NONE) {
|
||||
/* The KHR_blend_equation_advanced spec says:
|
||||
*
|
||||
* "If any non-NONE draw buffer uses a blend equation found in table
|
||||
|
||||
@@ -217,7 +217,8 @@ st_update_blend( struct st_context *st )
|
||||
blend->logicop_enable = 1;
|
||||
blend->logicop_func = ctx->Color._LogicOp;
|
||||
}
|
||||
else if (ctx->Color.BlendEnabled && !ctx->Color._AdvancedBlendMode) {
|
||||
else if (ctx->Color.BlendEnabled &&
|
||||
ctx->Color._AdvancedBlendMode == BLEND_NONE) {
|
||||
/* blending enabled */
|
||||
for (i = 0, j = 0; i < num_state; i++) {
|
||||
if (!(ctx->Color.BlendEnabled & (1 << i)) ||
|
||||
|
||||
Reference in New Issue
Block a user