From 09043aba638315c325fbc78a72995bb23a63ea22 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 10 Sep 2025 09:00:24 -0400 Subject: [PATCH] zink: flag vertex element state for rebind after vstate draws vstate draws bind their own elements unrelated to the bound gallium elements, so any draw occurring after a vstate draw must rebind to ensure the correct ones are bound Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13570 cc: mesa-stable Part-of: (cherry picked from commit 5fefb9e795dafe195399fac4d4a66c1fcda1b33e) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_draw.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index afc321830c1..abd096ecfa2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6344,7 +6344,7 @@ "description": "zink: flag vertex element state for rebind after vstate draws", "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 2575ef40747..ba5371f99fe 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -1018,6 +1018,8 @@ zink_draw_vertex_state(struct pipe_context *pctx, zink_draw(pctx, &dinfo, 0, NULL, draws, num_draws, vstate, partial_velem_mask); /* ensure ctx->vertex_buffers gets rebound on next non-vstate draw */ ctx->vertex_buffers_dirty = true; + /* ensure ctx->element_state gets rebound on next non-vstate draw */ + ctx->vertex_state_changed = true; if (info.take_vertex_state_ownership) pipe_vertex_state_reference(&vstate, NULL);