zink: update gfx pipeline less frequently
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37308>
This commit is contained in:
Mike Blumenkrantz 2025-08-13 13:55:50 -04:00 committed by Marge Bot
parent b497a81dd1
commit 32b4412d54

View file

@ -450,6 +450,7 @@ zink_draw(struct pipe_context *pctx,
0, 1, &mb, 0, NULL, 0, NULL);
}
unsigned rp_state = ctx->gfx_pipeline_state.rp_state;
zink_batch_rp(ctx);
/* check dead swapchain */
if (unlikely(!ctx->in_rp))
@ -520,7 +521,9 @@ zink_draw(struct pipe_context *pctx,
if (have_streamout && ctx->dirty_so_targets)
zink_emit_stream_output_targets(pctx);
bool pipeline_changed = update_gfx_pipeline<DYNAMIC_STATE, BATCH_CHANGED>(ctx, bs, mode);
bool pipeline_changed = rp_state != ctx->gfx_pipeline_state.rp_state || ctx->gfx_dirty || ctx->dirty_gfx_stages || prim_changed || BATCH_CHANGED ?
update_gfx_pipeline<DYNAMIC_STATE, BATCH_CHANGED>(ctx, bs, mode) :
false;
if (BATCH_CHANGED || ctx->vp_state_changed || (DYNAMIC_STATE == ZINK_NO_DYNAMIC_STATE && pipeline_changed)) {
VkViewport viewports[PIPE_MAX_VIEWPORTS];