From d09aac5e6477b0e0f1bec1f1ffda48e7fbc57bce Mon Sep 17 00:00:00 2001 From: Sviatoslav Peleshko Date: Wed, 13 Sep 2023 17:37:34 +0300 Subject: [PATCH] zink: Change zink_vertex_elements_hw_state::b.strides to VkDeviceSize Currently zink_vertex_elements_hw_state::b.strides is an array of 32-bit unsigned values, while CmdBindVertexBuffers2EXT expects an array of VkDeviceSize (64-bit unsigned). Instead of converting them for a call, just change the type of the array itself. Fixes: 76725452 ("gallium: move vertex stride to CSO") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9765 Signed-off-by: Sviatoslav Peleshko Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/zink_draw.cpp | 2 +- src/gallium/drivers/zink/zink_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 498d2fda43d..304cbb5aa20 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -170,7 +170,7 @@ zink_bind_vertex_buffers(struct zink_batch *batch, struct zink_context *ctx) if (elems->hw_state.num_bindings) VKCTX(CmdBindVertexBuffers2EXT)(batch->state->cmdbuf, 0, elems->hw_state.num_bindings, - buffers, buffer_offsets, NULL, (VkDeviceSize*)elems->hw_state.b.strides); + buffers, buffer_offsets, NULL, elems->hw_state.b.strides); } else if (elems->hw_state.num_bindings) VKSCR(CmdBindVertexBuffers)(batch->state->cmdbuf, 0, elems->hw_state.num_bindings, diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h index 350c051d587..8037028ae58 100644 --- a/src/gallium/drivers/zink/zink_types.h +++ b/src/gallium/drivers/zink/zink_types.h @@ -302,7 +302,7 @@ struct zink_vertex_elements_hw_state { struct { VkVertexInputBindingDivisorDescriptionEXT divisors[PIPE_MAX_ATTRIBS]; VkVertexInputBindingDescription bindings[PIPE_MAX_ATTRIBS]; // combination of element_state and stride - unsigned strides[PIPE_MAX_ATTRIBS]; + VkDeviceSize strides[PIPE_MAX_ATTRIBS]; uint8_t divisors_present; } b; VkVertexInputBindingDescription2EXT dynbindings[PIPE_MAX_ATTRIBS];