diff options
author | Karl Schultz <karl@lunarg.com> | 2018-08-02 17:58:42 -0600 |
---|---|---|
committer | Lenny Komow <lenny@lunarg.com> | 2018-08-03 16:10:11 -0600 |
commit | c8e4d9ff363ee3112f528a5ad07e3f20fd031d18 (patch) | |
tree | 112bdabf14b045a053f175f800395cede204bb59 | |
parent | 4b858b5b90eac5cd4b35c9d4c15fb220703dc50e (diff) | |
download | Vulkan-Loader-c8e4d9ff363ee3112f528a5ad07e3f20fd031d18.tar.gz Vulkan-Loader-c8e4d9ff363ee3112f528a5ad07e3f20fd031d18.tar.bz2 Vulkan-Loader-c8e4d9ff363ee3112f528a5ad07e3f20fd031d18.zip |
loader: Save gipa and gpda ptrs in instance chain
Change-Id: Iaf7d0084cbeb41e7542787a5b013a918a2431b82
-rw-r--r-- | loader/loader.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/loader/loader.c b/loader/loader.c index de573aec..d18786d5 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -4653,6 +4653,7 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, c PFN_vkGetInstanceProcAddr next_gipa = loader_gpa_instance_internal; PFN_vkGetInstanceProcAddr cur_gipa = loader_gpa_instance_internal; + PFN_vkGetDeviceProcAddr cur_gdpa = loader_gpa_device_internal; PFN_GetPhysicalDeviceProcAddr next_gpdpa = loader_gpdpa_instance_internal; PFN_GetPhysicalDeviceProcAddr cur_gpdpa = loader_gpdpa_instance_internal; @@ -4714,6 +4715,7 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, c // structure. if (interface_struct.loaderLayerInterfaceVersion > 1) { cur_gipa = interface_struct.pfnGetInstanceProcAddr; + cur_gdpa = interface_struct.pfnGetDeviceProcAddr; cur_gpdpa = interface_struct.pfnGetPhysicalDeviceProcAddr; if (cur_gipa != NULL) { // We've set the functions, so make sure we @@ -4755,6 +4757,12 @@ VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, c layer_prop->functions.get_physical_device_proc_addr = cur_gpdpa; next_gpdpa = cur_gpdpa; } + if (layer_prop->interface_version > 1 && cur_gipa != NULL) { + layer_prop->functions.get_instance_proc_addr = cur_gipa; + } + if (layer_prop->interface_version > 1 && cur_gdpa != NULL) { + layer_prop->functions.get_device_proc_addr = cur_gdpa; + } chain_info.u.pLayerInfo = &layer_instance_link_info[activated_layers]; |