[PATCH 0/7] Wine Vulkan and Direct3D 12

Józef Kucia jkucia at codeweavers.com
Sat Mar 24 08:27:58 CDT 2018


The following patch series was written mainly for Direct3D 12
integration. Our Direct3D 12 is going to use host Vulkan, but we want to
share platform-specific WSI code with Wine Vulkan. The series makes
sense on its own as well, as it lets us to use autogenerated thunks for
more Vulkan functions.

We add additional requirement for Wine Vulkan drivers:
vkGetInstanceProcAddr() and vkGetDeviceProcAddr() must return function
pointers to overridden Vulkan functions. This requirement allow us to
treat Wine Vulkan driver as host Vulkan implementation extended with
VK_KHR_win32_surface.

The plan is to make our D3D12 implementation another client of Wine
Vulkan driver, i.e. D3D12 is going to call __wine_get_vulkan_driver().
Thanks to this series, we'll be able to pass vkGetInstanceProcAddr() to
libvkd3d and tell libvkd3d enable VK_KHR_win32_surface.

We could take this idea further and minimize Wine Vulkan driver
interface to a single function: vkGetInstanceProcAddr(). The only
requirement would be that Wine Vulkan driver has to provide an
implementation of VK_KHR_win32_surface. On the other hand, the
vulkan_funcs structure makes it more explicit what is expected to be
implemented by Wine Vulkan driver.

CC: Roderick Colenbrander <thunderbird2k at gmail.com>

Józef Kucia (7):
  winevulkan: Get rid of unnecessary forward declarations.
  winex11: Return Wine Vulkan driver functions from
    vkGetInstanceProcAddr().
  winex11: Return Wine Vulkan driver functions from
    vkGetDeviceProcAddr().
  winevulkan: Generate conversions only for autogenerated thunks.
  winevulkan: Put all required functions into function tables.
  winevulkan: Mark explicitly if driver function is needed in dispatch
    tables.
  winevulkan: Autogenerate thunks for functions overridden by Wine
    Vulkan driver.

 dlls/winevulkan/make_vulkan     |  49 +++---
 dlls/winevulkan/vulkan.c        | 341 +++++++++++-----------------------------
 dlls/winevulkan/vulkan_thunks.c | 118 ++++++++++++--
 dlls/winevulkan/vulkan_thunks.h |  42 +++--
 dlls/winex11.drv/vulkan.c       |  94 ++++++++++-
 5 files changed, 338 insertions(+), 306 deletions(-)

-- 
2.16.1




More information about the wine-devel mailing list