From a7a020dde6d115001faabdbf343349d7d9bc40f6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 29 Oct 2025 09:59:13 -0400 Subject: [PATCH] zink: collapse mesh pipeline fetching and binding conditionals this avoids taking the wrong conditional if a pipeline fetch fails cc: mesa-stable (cherry picked from commit 343eef990e54d974d811f7414e79a8854b8c97f9) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_draw.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index bbc575aaac5..0cfb690beb2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -704,7 +704,7 @@ "description": "zink: collapse mesh pipeline fetching and binding conditionals", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 83e705c9f70..090b48a823a 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -985,8 +985,7 @@ update_mesh_pipeline(struct zink_context *ctx, struct zink_batch_state *bs) pipeline = zink_get_gfx_pipeline(ctx, ctx->mesh_program, &ctx->gfx_pipeline_state, MESA_PRIM_COUNT); else pipeline = zink_get_gfx_pipeline(ctx, ctx->mesh_program, &ctx->gfx_pipeline_state, MESA_PRIM_COUNT); - } - if (pipeline) { + assert(pipeline); pipeline_changed = prev_pipeline != pipeline || ctx->shobj_draw; if (BATCH_CHANGED || pipeline_changed) VKCTX(CmdBindPipeline)(bs->cmdbuf, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);