mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 16:42:26 +00:00
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:
parent
d933f5204b
commit
e6fc5d1e49
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user