From c677a0b04432666a328ef6acd0e0dc5a034521e9 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 14 Oct 2020 14:07:07 +0330 Subject: [PATCH] wined3d: Use wined3d_get_primary_adapter_luid() if we didn't get a valid LUID from Vulkan. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/adapter_vk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index beda271c32d..3fb9e4ce4b4 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2242,7 +2242,7 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, struct wined3d_adapter *adapter = &adapter_vk->a; VkPhysicalDeviceIDProperties id_properties; VkPhysicalDeviceProperties2 properties2; - LUID *luid = NULL; + LUID primary_luid, *luid = NULL; TRACE("adapter_vk %p, ordinal %u, wined3d_creation_flags %#x.\n", adapter_vk, ordinal, wined3d_creation_flags); @@ -2274,6 +2274,8 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk, if (id_properties.deviceLUIDValid) luid = (LUID *)id_properties.deviceLUID; + else if (ordinal == 0 && wined3d_get_primary_adapter_luid(&primary_luid)) + luid = &primary_luid; if (!wined3d_adapter_init(adapter, ordinal, luid, &wined3d_adapter_vk_ops)) {