render/vulkan: increase next descriptor pool size

This ensures that the pool sizes grow exponentially, making the number
of pools needed logarithmic in the number of descriptors, instead of
linear. Since the first pool's size is 256, this change only has an
effect when the compositor creates a large number of textures.
This commit is contained in:
Manuel Stoeckl 2022-11-26 10:42:23 -05:00 committed by Simon Ser
parent d933f5204b
commit e6fc5d1e49
1 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,7 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
return NULL;
}
size_t count = renderer->last_pool_size;
size_t count = 2 * renderer->last_pool_size;
if (!count) {
count = start_descriptor_pool_size;
}
@ -134,6 +134,7 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
return NULL;
}
renderer->last_pool_size = count;
wl_list_insert(&renderer->descriptor_pools, &pool->link);
}