zink: fix dynamic stride conditional in pipeline creation

if dynamic stride isn't used then this struct member must be filled

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010>
This commit is contained in:
Mike Blumenkrantz 2022-06-06 09:11:17 -04:00 committed by Marge Bot
parent 1a89e358d6
commit 336b5c8823

View file

@ -54,7 +54,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
{
struct zink_rasterizer_hw_state *hw_rast_state = (void*)state;
VkPipelineVertexInputStateCreateInfo vertex_input_state;
if (!screen->info.have_EXT_vertex_input_dynamic_state || !state->element_state->num_attribs) {
if (!screen->info.have_EXT_vertex_input_dynamic_state || !state->element_state->num_attribs || !state->uses_dynamic_stride) {
memset(&vertex_input_state, 0, sizeof(vertex_input_state));
vertex_input_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
vertex_input_state.pVertexBindingDescriptions = state->element_state->b.bindings;
@ -324,7 +324,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
pci.renderPass = state->render_pass->render_pass;
else
pci.pNext = &state->rendering_info;
if (!screen->info.have_EXT_vertex_input_dynamic_state || !state->element_state->num_attribs)
if (!screen->info.have_EXT_vertex_input_dynamic_state || !state->element_state->num_attribs || !state->uses_dynamic_stride)
pci.pVertexInputState = &vertex_input_state;
pci.pInputAssemblyState = &primitive_state;
pci.pRasterizationState = &rast_state;