Signed-off-by: Roderick Colenbrander thunderbird2k@gmail.com --- dlls/winevulkan/vulkan.c | 10 ++++++++++ dlls/winevulkan/vulkan.py | 15 +++++++++++++++ dlls/winevulkan/vulkan_thunks.h | 3 +++ 3 files changed, 28 insertions(+)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 6a0913a59b..82394761fd 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -112,6 +112,16 @@ err: return res; }
+void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) +{ + TRACE("%p, %p\n", instance, pAllocator); + + if (pAllocator) + FIXME("Support allocation allocators\n"); + + wine_vk_instance_free(instance); +} + static VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_name, uint32_t *count, VkExtensionProperties *properties) { diff --git a/dlls/winevulkan/vulkan.py b/dlls/winevulkan/vulkan.py index 5bac258294..bc5fcdea1c 100755 --- a/dlls/winevulkan/vulkan.py +++ b/dlls/winevulkan/vulkan.py @@ -1032,6 +1032,21 @@ class VkGenerator(object): f.write("/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */\n") f.write("void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;\n\n")
+ # Generate prototypes for device and instance functions requiring a custom implementation. + f.write("/* Functions for which we have custom implementations outside of the thunks. */\n") + for vk_func in self.registry.funcs.values(): + if not vk_func.is_required(): + continue + + if vk_func.is_global_func(): + continue + + if vk_func.needs_thunk(): + continue + + f.write("{0};\n".format(vk_func.prototype("WINAPI", prefix="wine_", postfix="DECLSPEC_HIDDEN"))) + f.write("\n") + f.write("#endif /* __WINE_VULKAN_THUNKS_H */\n")
def generate_vulkan_h(self, f): diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index dbfd83c115..969bf125f9 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -6,4 +6,7 @@ /* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */ void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;
+/* Functions for which we have custom implementations outside of the thunks. */ +void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN; + #endif /* __WINE_VULKAN_THUNKS_H */