vulkan: Don't allocate no descriptor sets

If we don't need them, exit early.

Shuts up the validation layers when running simple denos without
textures.
This commit is contained in:
Benjamin Otte 2023-05-12 22:19:37 +02:00
parent 52eefdb7d9
commit 76634cb68b

View File

@ -500,6 +500,9 @@ gsk_vulkan_render_prepare_descriptor_sets (GskVulkanRender *self)
}
needed_sets = g_hash_table_size (self->descriptor_set_indexes);
if (needed_sets == 0)
return;
if (needed_sets > self->n_descriptor_sets)
{
if (needed_sets > self->descriptor_pool_maxsets)