Mesa (main): zink: update gfx_pipeline_state.vertex_strides when necessary

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 14 16:31:31 UTC 2022


Module: Mesa
Branch: main
Commit: a21d2bfd771ae44bdb4c997e6dce746bf65d66fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a21d2bfd771ae44bdb4c997e6dce746bf65d66fa

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Jan 14 10:20:17 2022 -0500

zink: update gfx_pipeline_state.vertex_strides when necessary

only necessary without any of the dynamic states and still doesn't fix
the problem, but it's a step

cc: mesa-stable

Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14561>

---

 src/gallium/drivers/zink/zink_context.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 38cacca5409..ac318d077b1 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -982,6 +982,8 @@ zink_set_vertex_buffers(struct pipe_context *pctx,
             res->vbo_bind_mask |= BITFIELD_BIT(start_slot + i);
             update_res_bind_count(ctx, res, false, false);
             ctx_vb->stride = vb->stride;
+            if (need_state_change)
+               ctx->gfx_pipeline_state.vertex_strides[start_slot + i] = vb->stride;
             ctx_vb->buffer_offset = vb->buffer_offset;
             /* always barrier before possible rebind */
             zink_resource_buffer_barrier(ctx, res, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT,



More information about the mesa-commit mailing list