mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
zink: delete need_blend_constants
this is an artifact of very old code before the dynamic state was set for all graphics pipelines now the checks only cause blend constants to not be updated, which triggers bugs and validation failures cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20799>
This commit is contained in:
parent
c1d99283e6
commit
b4d18f2ad1
3 changed files with 1 additions and 26 deletions
|
|
@ -766,8 +766,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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -329,7 +329,6 @@ struct zink_blend_state {
|
|||
VkBool32 alpha_to_coverage;
|
||||
VkBool32 alpha_to_one;
|
||||
|
||||
bool need_blend_constants;
|
||||
bool dual_src_blend;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue