From 87a63e942c6a067b9555af13e14e025fe67903c4 Mon Sep 17 00:00:00 2001 From: Cody Goodson Date: Sun, 6 Jun 2021 23:16:45 -0500 Subject: [PATCH] Fixed a bug where user provided vkGetInstanceProcAddr pfn's were being ignored. Cleaned up un-needed locks. --- src/VkBootstrap.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 4f11158..3ba1fe5 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -168,13 +168,10 @@ class VulkanFunctions { } template void get_inst_proc_addr(T& out_ptr, const char* func_name) { - std::lock_guard lg(init_mutex); get_proc_addr(out_ptr, func_name); } void init_instance_funcs(VkInstance inst) { - std::lock_guard lg(init_mutex); - instance = inst; get_proc_addr(fp_vkDestroyInstance, "vkDestroyInstance"); get_proc_addr(fp_vkEnumeratePhysicalDevices, "vkEnumeratePhysicalDevices"); @@ -583,7 +580,7 @@ InstanceBuilder::InstanceBuilder() {} detail::Result InstanceBuilder::build() const { - auto sys_info_ret = SystemInfo::get_system_info(); + auto sys_info_ret = SystemInfo::get_system_info(info.fp_vkGetInstanceProcAddr); if (!sys_info_ret) return sys_info_ret.error(); auto system = sys_info_ret.value();