aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2022-11-26 10:42:23 -0500
committerSimon Ser <contact@emersion.fr>2023-05-06 18:16:45 +0000
commite6fc5d1e499e7bfd8862f06583aee6323574f957 (patch)
tree8066f7b6401739a49fab62e172edf7c08c12a263
parentd933f5204b4723eeb64b3c734d4017067f11811b (diff)
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.
-rw-r--r--render/vulkan/renderer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index 82d81c00..a9adc1af 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -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);
}