diff --git a/.pick_status.json b/.pick_status.json index 9a87ace4367..e2d8b53d039 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2083,7 +2083,7 @@ "description": "zink: delete need_blend_constants", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 1f1936e48a4..035e20b4e78 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -736,8 +736,7 @@ zink_draw(struct pipe_context *pctx, ctx->sample_locations_changed = false; } - if ((BATCH_CHANGED || ctx->blend_state_changed) && - ctx->gfx_pipeline_state.blend_state->need_blend_constants) { + if (BATCH_CHANGED || ctx->blend_state_changed) { VKCTX(CmdSetBlendConstants)(batch->state->cmdbuf, ctx->blend_constants); } ctx->blend_state_changed = false; diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c index 8d0ba5d496d..1953d059077 100644 --- a/src/gallium/drivers/zink/zink_state.c +++ b/src/gallium/drivers/zink/zink_state.c @@ -280,21 +280,6 @@ blend_factor(enum pipe_blendfactor factor) } -static bool -need_blend_constants(enum pipe_blendfactor factor) -{ - switch (factor) { - case PIPE_BLENDFACTOR_CONST_COLOR: - case PIPE_BLENDFACTOR_CONST_ALPHA: - case PIPE_BLENDFACTOR_INV_CONST_COLOR: - case PIPE_BLENDFACTOR_INV_CONST_ALPHA: - return true; - - default: - return false; - } -} - static VkBlendOp blend_op(enum pipe_blend_func func) { @@ -371,8 +356,6 @@ zink_create_blend_state(struct pipe_context *pctx, cso->alpha_to_coverage = blend_state->alpha_to_coverage; cso->alpha_to_one = blend_state->alpha_to_one; - cso->need_blend_constants = false; - for (int i = 0; i < blend_state->max_rt + 1; ++i) { const struct pipe_rt_blend_state *rt = blend_state->rt; if (blend_state->independent_blend_enable) @@ -388,12 +371,6 @@ zink_create_blend_state(struct pipe_context *pctx, att.srcAlphaBlendFactor = blend_factor(fix_blendfactor(rt->alpha_src_factor, cso->alpha_to_one)); att.dstAlphaBlendFactor = blend_factor(fix_blendfactor(rt->alpha_dst_factor, cso->alpha_to_one)); att.alphaBlendOp = blend_op(rt->alpha_func); - - if (need_blend_constants(rt->rgb_src_factor) || - need_blend_constants(rt->rgb_dst_factor) || - need_blend_constants(rt->alpha_src_factor) || - need_blend_constants(rt->alpha_dst_factor)) - cso->need_blend_constants = true; } if (rt->colormask & PIPE_MASK_R) diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h index a179f39c133..7bbbfb431cc 100644 --- a/src/gallium/drivers/zink/zink_types.h +++ b/src/gallium/drivers/zink/zink_types.h @@ -318,7 +318,6 @@ struct zink_blend_state { VkBool32 alpha_to_coverage; VkBool32 alpha_to_one; - bool need_blend_constants; bool dual_src_blend; };