mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01: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
1 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,7 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t count = renderer->last_pool_size;
|
size_t count = 2 * renderer->last_pool_size;
|
||||||
if (!count) {
|
if (!count) {
|
||||||
count = start_descriptor_pool_size;
|
count = start_descriptor_pool_size;
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,7 @@ struct wlr_vk_descriptor_pool *vulkan_alloc_texture_ds(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderer->last_pool_size = count;
|
||||||
wl_list_insert(&renderer->descriptor_pools, &pool->link);
|
wl_list_insert(&renderer->descriptor_pools, &pool->link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue