On Thu Mar 21 14:52:12 2024 +0000, Rémi Bernon wrote:
My plan was to gradually move the current vulkan_driver interface to exist only between win32u and winevulkan, and define a different and very reduced one between win32u and the user drivers. Something along those lines:
/* interface between winevulkan and win32u */ struct vulkan_funcs { VkResult (*p_vkCreateWin32SurfaceKHR)(VkInstance, const VkWin32SurfaceCreateInfoKHR *, const VkAllocationCallbacks *, VkSurfaceKHR *); void (*p_vkDestroySurfaceKHR)(VkInstance, VkSurfaceKHR, const VkAllocationCallbacks *); void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *); void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *); VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t); /* winevulkan specific functions */ const char *(*p_get_host_surface_extension)(void); VkSurfaceKHR (*p_wine_get_host_surface)(VkSurfaceKHR); }; /* interface between win32u and the user drivers */ struct vulkan_driver_funcs { VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t); const char *(*p_get_host_surface_extension)(void); void *(*p_vulkan_surface_create)(VkInstance, HWND, VkSurfaceKHR *); void (*p_vulkan_surface_destroy)(VkInstance, HWND, VkSurfaceKHR, void *); void (*p_vulkan_surface_attach)(HWND, VkSurfaceKHR, void *, const RECT *); void (*p_vulkan_surface_detach)(HWND, VkSurfaceKHR, void *, HDC *); };
I'm fine loading the vulkan library in win32u, but there's the mac driver which has specific needs and needs to load SONAME_LIBMOLTENVK instead of SONAME_VULKAN. This is the reason I chose to make the drivers return the vulkan handle.
I like the big picture.
I'm fine loading the vulkan library in win32u, but there's the mac driver which has specific needs and needs to load SONAME_LIBMOLTENVK instead of SONAME_VULKAN.
I guess we could change that in configure with something like: ``` WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr, [AC_DEFINE_UNQUOTED(SONAME_LIBVULKAN,[$ac_cv_lib_soname_MoltenVK])]) ```