Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49542 Signed-off-by: Georg Lehmann dadschoorse@gmail.com --- dlls/winevulkan/loader.c | 6 ++++++ dlls/winevulkan/make_vulkan | 4 ++++ dlls/winevulkan/vulkan.c | 5 +++++ dlls/winevulkan/vulkan_private.h | 2 ++ 4 files changed, 17 insertions(+)
diff --git a/dlls/winevulkan/loader.c b/dlls/winevulkan/loader.c index 6bc32620bba..4857a0adc7a 100644 --- a/dlls/winevulkan/loader.c +++ b/dlls/winevulkan/loader.c @@ -116,6 +116,9 @@ PFN_vkVoidFunction WINAPI vkGetInstanceProcAddr(VkInstance instance, const char return NULL; }
+ if (!unix_funcs->p_is_available_instance_function(instance, name)) + return NULL; + func = wine_vk_get_instance_proc_addr(name); if (func) return func;
@@ -175,6 +178,9 @@ void * WINAPI vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char *n { TRACE("%p, %s\n", instance, debugstr_a(name));
+ if (!unix_funcs->p_is_available_instance_function(instance, name)) + return NULL; + return wine_vk_get_phys_dev_proc_addr(name); }
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 55b5b71691e..760c460b6fe 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2788,6 +2788,7 @@ class VkGenerator(object): continue
f.write(" &{1}{0},\n".format(vk_func.name, prefix)) + f.write(" &wine_vk_is_available_instance_function,\n") f.write("};\n")
def generate_thunks_h(self, f, prefix): @@ -2988,6 +2989,9 @@ class VkGenerator(object): continue
f.write(" {0};\n".format(vk_func.pfn(conv=False, call_conv="WINAPI"))) + f.write("\n") + f.write(" /* winevulkan specific functions */\n") + f.write(" BOOL (WINAPI *p_is_available_instance_function)(VkInstance, const char *);\n") f.write("};\n\n")
f.write("#endif /* __WINE_VULKAN_LOADER_THUNKS_H */\n") diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index fb0ffbdfe6c..3658a4378cb 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1605,3 +1605,8 @@ void WINAPI wine_vkDestroyDebugReportCallbackEXT(
free(object); } + +BOOL WINAPI wine_vk_is_available_instance_function(VkInstance instance, const char *name) +{ + return !!vk_funcs->p_vkGetInstanceProcAddr(instance->instance, name); +} diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index 83dc90ca15e..ce83b2b7032 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -212,4 +212,6 @@ uint64_t wine_vk_unwrap_handle(VkObjectType type, uint64_t handle) DECLSPEC_HIDD
extern const struct unix_funcs loader_funcs;
+BOOL WINAPI wine_vk_is_available_instance_function(VkInstance instance, const char *name) DECLSPEC_HIDDEN; + #endif /* __WINE_VULKAN_PRIVATE_H */