zink: assert that the dynamic state array size is big enough

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15328>
This commit is contained in:
Mike Blumenkrantz 2022-03-07 15:56:58 -05:00 committed by Marge Bot
parent 6cc4cdaa6f
commit d1f12b1924
1 changed files with 1 additions and 0 deletions

View File

@ -244,6 +244,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen,
}
rast_state.pNext = &rast_line_state;
}
assert(state_count < ARRAY_SIZE(dynamicStateEnables));
VkPipelineDynamicStateCreateInfo pipelineDynamicStateCreateInfo = {0};
pipelineDynamicStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;