diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 3c200ceda5..b7136d7c60 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -830,19 +830,20 @@ static struct vk_descriptor_pool *vulkan_alloc_descriptor_pool( if (!pool) return NULL; - pool_info.maxSets = VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS; + pool_info.maxSets = VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS; pool_info.poolSizeCount = manager->num_sizes; - pool_info.pPoolSizes = manager->sizes; - pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; + pool_info.pPoolSizes = manager->sizes; + pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; VKFUNC(vkCreateDescriptorPool)(device, &pool_info, NULL, &pool->pool); /* Just allocate all descriptor sets up front. */ - alloc_info.descriptorPool = pool->pool; + alloc_info.descriptorPool = pool->pool; alloc_info.descriptorSetCount = 1; - alloc_info.pSetLayouts = &manager->set_layout; + alloc_info.pSetLayouts = &manager->set_layout; + for (i = 0; i < VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS; i++) - vkAllocateDescriptorSets(device, &alloc_info, &pool->sets[i]); + VKFUNC(vkAllocateDescriptorSets)(device, &alloc_info, &pool->sets[i]); return pool; } @@ -1164,6 +1165,7 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateDescriptorPool); /* Descriptor sets */ + VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, AllocateDescriptorSets); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, FreeDescriptorSets); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, UpdateDescriptorSets); diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index d25e5f4dce..199c1a2332 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -198,6 +198,7 @@ typedef struct vulkan_context PFN_vkCreateDescriptorPool vkCreateDescriptorPool; /* Descriptor sets */ + PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets; PFN_vkFreeDescriptorSets vkFreeDescriptorSets; PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets; PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;