From 9d46a1863b5539ed7e7c7e3992a7c2a43f6857b3 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Fri, 25 Oct 2024 12:50:08 +1000 Subject: [PATCH] vkd3d: Introduce vkd3d_vk_descriptor_pool_array_push(). --- libs/vkd3d/command.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index d06db924..f8abc77a 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -1277,6 +1277,12 @@ static bool vkd3d_vk_descriptor_pool_array_push_array(struct vkd3d_vk_descriptor return true; } +static bool vkd3d_vk_descriptor_pool_array_push(struct vkd3d_vk_descriptor_pool_array *array, + VkDescriptorPool vk_pool) +{ + return vkd3d_vk_descriptor_pool_array_push_array(array, &vk_pool, 1); +} + /* Command buffers */ static void d3d12_command_list_mark_as_invalid(struct d3d12_command_list *list, const char *message, ...) @@ -1398,12 +1404,6 @@ static bool d3d12_command_allocator_add_framebuffer(struct d3d12_command_allocat return true; } -static bool d3d12_command_allocator_add_descriptor_pool(struct d3d12_command_allocator *allocator, - VkDescriptorPool pool) -{ - return vkd3d_vk_descriptor_pool_array_push_array(&allocator->descriptor_pools, &pool, 1); -} - static bool d3d12_command_allocator_add_view(struct d3d12_command_allocator *allocator, struct vkd3d_view *view) { @@ -1472,7 +1472,7 @@ static VkDescriptorPool d3d12_command_allocator_allocate_descriptor_pool( } } - if (!(d3d12_command_allocator_add_descriptor_pool(allocator, vk_pool))) + if (!(vkd3d_vk_descriptor_pool_array_push(&allocator->descriptor_pools, vk_pool))) { ERR("Failed to add descriptor pool.\n"); VK_CALL(vkDestroyDescriptorPool(vk_device, vk_pool, NULL));