From 5dc2d329cb0130413bbbf3c7500076e7c5f7f065 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 19 Jun 2023 12:19:19 -0400 Subject: [PATCH] zink: use local screen var in blend state bind Part-of: --- src/gallium/drivers/zink/zink_state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_state.c b/src/gallium/drivers/zink/zink_state.c index ebccd79fc29..cbe77adfe53 100644 --- a/src/gallium/drivers/zink/zink_state.c +++ b/src/gallium/drivers/zink/zink_state.c @@ -403,17 +403,18 @@ static void zink_bind_blend_state(struct pipe_context *pctx, void *cso) { struct zink_context *ctx = zink_context(pctx); + struct zink_screen *screen = zink_screen(pctx->screen); struct zink_gfx_pipeline_state* state = &zink_context(pctx)->gfx_pipeline_state; zink_flush_dgc_if_enabled(ctx); struct zink_blend_state *blend = cso; if (state->blend_state != cso) { state->blend_state = cso; - if (!zink_screen(pctx->screen)->have_full_ds3) { + if (!screen->have_full_ds3) { state->blend_id = blend ? blend->hash : 0; state->dirty = true; } - bool force_dual_color_blend = zink_screen(pctx->screen)->driconf.dual_color_blend_by_location && + bool force_dual_color_blend = screen->driconf.dual_color_blend_by_location && blend && blend->dual_src_blend && state->blend_state->attachments[0].blendEnable; if (force_dual_color_blend != zink_get_fs_base_key(ctx)->force_dual_color_blend) zink_set_fs_base_key(ctx)->force_dual_color_blend = force_dual_color_blend;