zink: Store zink_vertex_elements_hw_state::b.strides by binding id
authorSviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Wed, 20 Sep 2023 13:31:57 +0000 (16:31 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 20 Sep 2023 13:44:28 +0000 (13:44 +0000)
commit465644640a0a8bfee3200c7dafdca11938c88311
tree72cf2e34560237b8c59d6f78e3caa07bbf9ea87e
parent2993853f492eafc9dea19f0c1eb7a6293363d77d
zink: Store zink_vertex_elements_hw_state::b.strides by binding id

Currently, we store strides by vertex buffer id, which means that we have
to map the binding index to the vertex buffer index every time we want to
get a stride for a given binding. This also creates an order mismatch when
we pass strides directly to CmdBindVertexBuffers2EXT. Instead of converting
strides for CmdBindVertexBuffers2EXT too, we can just store strides by
binding id, and drop the mapping in other places.

Fixes: 76725452 ("gallium: move vertex stride to CSO")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9817
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25305>
src/gallium/drivers/zink/zink_draw.cpp
src/gallium/drivers/zink/zink_program_state.hpp
src/gallium/drivers/zink/zink_state.c