zink: don't always set VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT with gpl
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 21 Sep 2022 13:21:42 +0000 (09:21 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 22 Sep 2022 01:12:01 +0000 (01:12 +0000)
this is illegal

Fixes: 86e4fcd9a92 ("zink: add a graphics pipeline library implementation")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18729>

src/gallium/drivers/zink/zink_pipeline.c

index 2872c18..ece07be 100644 (file)
@@ -547,7 +547,7 @@ zink_create_gfx_pipeline_input(struct zink_screen *screen,
    unsigned state_count = 0;
    if (screen->info.have_EXT_vertex_input_dynamic_state)
       dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VERTEX_INPUT_EXT;
-   else if (state->uses_dynamic_stride)
+   else if (state->uses_dynamic_stride && state->element_state->num_attribs)
       dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT;
    dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY;
    dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE;