mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
zink: use statically sized array for descriptor allocation
this will never be more than 100 Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18051>
This commit is contained in:
parent
2ca46b66c3
commit
89daf988bc
1 changed files with 2 additions and 1 deletions
|
|
@ -280,7 +280,8 @@ bool
|
|||
zink_descriptor_util_alloc_sets(struct zink_screen *screen, VkDescriptorSetLayout dsl, VkDescriptorPool pool, VkDescriptorSet *sets, unsigned num_sets)
|
||||
{
|
||||
VkDescriptorSetAllocateInfo dsai;
|
||||
VkDescriptorSetLayout *layouts = alloca(sizeof(*layouts) * num_sets);
|
||||
VkDescriptorSetLayout layouts[100];
|
||||
assert(num_sets <= ARRAY_SIZE(layouts));
|
||||
memset((void *)&dsai, 0, sizeof(dsai));
|
||||
dsai.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
|
||||
dsai.pNext = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue