In order to bypass Vulkan loader trampoline.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_vk.c | 17 +++++++++++++++-- dlls/wined3d/wined3d_vk.h | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 813a027efd26..e573c66e5614 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -30,6 +30,8 @@ struct wined3d_device_vk
VkDevice vk_device; VkQueue vk_queue; + + struct wined3d_vk_info vk_info; };
static inline struct wined3d_device_vk *wined3d_device_vk(struct wined3d_device *device) @@ -220,6 +222,18 @@ static HRESULT adapter_vk_create_device(struct wined3d *wined3d, const struct wi device_vk->vk_device = vk_device; VK_CALL(vkGetDeviceQueue(vk_device, queue_family_index, 0, &device_vk->vk_queue));
+ device_vk->vk_info = *vk_info; +#define LOAD_DEVICE_PFN(name) \ + if (!(device_vk->vk_info.vk_ops.name = (void *)VK_CALL(vkGetDeviceProcAddr(vk_device, #name)))) \ + { \ + WARN("Could not get device proc addr for '" #name "'.\n"); \ + hr = E_FAIL; \ + goto fail; \ + } +#define VK_DEVICE_PFN LOAD_DEVICE_PFN + VK_DEVICE_FUNCS() +#undef VK_DEVICE_PFN + if (FAILED(hr = wined3d_device_init(&device_vk->d, wined3d, adapter->ordinal, device_type, focus_window, flags, surface_alignment, levels, level_count, device_parent))) { @@ -237,9 +251,8 @@ fail:
static void adapter_vk_destroy_device(struct wined3d_device *device) { - struct wined3d_adapter_vk *adapter_vk = wined3d_adapter_vk(device->adapter); struct wined3d_device_vk *device_vk = wined3d_device_vk(device); - const struct wined3d_vk_info *vk_info = &adapter_vk->vk_info; + const struct wined3d_vk_info *vk_info = &device_vk->vk_info;
wined3d_device_cleanup(&device_vk->d); VK_CALL(vkDestroyDevice(device_vk->vk_device, NULL)); diff --git a/dlls/wined3d/wined3d_vk.h b/dlls/wined3d/wined3d_vk.h index 10c706a10331..13e07ab3db4d 100644 --- a/dlls/wined3d/wined3d_vk.h +++ b/dlls/wined3d/wined3d_vk.h @@ -183,9 +183,9 @@ struct vulkan_ops
struct wined3d_vk_info { - VkInstance instance; struct vulkan_ops vk_ops;
+ VkInstance instance; unsigned int api_version;
#ifdef USE_WIN32_VULKAN
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=51155
Your paranoid android.
=== debian9 (build log) ===
error: patch failed: dlls/wined3d/adapter_vk.c:30 Task: Patch failed to apply
=== debian9 (build log) ===
error: patch failed: dlls/wined3d/adapter_vk.c:30 Task: Patch failed to apply