From 2ce6652a7a6480b231359539abf5d2fab81d1ab9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 24 Mar 2023 16:11:44 -0400 Subject: [PATCH] zink: flag vertex buffers for rebind after vstate draws vstate draws bind their own vertex buffers unrelated to the bound gallium buffers, so any draw occurring after a vstate draw must rebind vertex buffers to ensure the correct ones are bound cc: mesa-stable Part-of: (cherry picked from commit 4be5caba671e166caf8aa7dcb31acf582c67e9eb) --- .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 113226ce72b..8be92a3e489 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1219,7 +1219,7 @@ "description": "zink: flag vertex buffers for rebind after vstate draws", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index d8c24e785c4..7f2196f42a9 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -974,6 +974,8 @@ zink_draw_vertex_state(struct pipe_context *pctx, ctx->gfx_pipeline_state.element_state = &((struct zink_vertex_state*)vstate)->velems.hw_state; 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; ctx->gfx_pipeline_state.element_state = hw_state; if (info.take_vertex_state_ownership)