From 7174545ee8c886d23c78e08c45c03cf65be7ec3a Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Sun, 5 Dec 2021 23:43:55 +0100 Subject: [PATCH] aux/vk: remove duplication of vk_get_loader_functions functionality --- src/xrt/auxiliary/vk/vk_helpers.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xrt/auxiliary/vk/vk_helpers.c b/src/xrt/auxiliary/vk/vk_helpers.c index 714883d92..75bd26416 100644 --- a/src/xrt/auxiliary/vk/vk_helpers.c +++ b/src/xrt/auxiliary/vk/vk_helpers.c @@ -1626,16 +1626,17 @@ vk_init_from_given(struct vk_bundle *vk, // First memset it clear. U_ZERO(vk); - vk->vkGetInstanceProcAddr = vkGetInstanceProcAddr; + ret = vk_get_loader_functions(vk, vkGetInstanceProcAddr); + if (ret != VK_SUCCESS) { + goto err_memset; + } + vk->instance = instance; vk->physical_device = physical_device; vk->device = device; vk->queue_family_index = queue_family_index; vk->queue_index = queue_index; - // Not really needed but just in case. - vk->vkCreateInstance = GET_PROC(vk, vkCreateInstance); - // Fill in all instance functions. ret = vk_get_instance_functions(vk); if (ret != VK_SUCCESS) {