wined3d: Use wined3d_get_primary_adapter_luid() if we didn't get a valid LUID from Vulkan.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-10-14 14:07:07 +03:30 committed by Alexandre Julliard
parent 579618c0d7
commit c677a0b044
1 changed files with 3 additions and 1 deletions

View File

@ -2242,7 +2242,7 @@ static BOOL wined3d_adapter_vk_init(struct wined3d_adapter_vk *adapter_vk,
struct wined3d_adapter *adapter = &adapter_vk->a; struct wined3d_adapter *adapter = &adapter_vk->a;
VkPhysicalDeviceIDProperties id_properties; VkPhysicalDeviceIDProperties id_properties;
VkPhysicalDeviceProperties2 properties2; VkPhysicalDeviceProperties2 properties2;
LUID *luid = NULL; LUID primary_luid, *luid = NULL;
TRACE("adapter_vk %p, ordinal %u, wined3d_creation_flags %#x.\n", TRACE("adapter_vk %p, ordinal %u, wined3d_creation_flags %#x.\n",
adapter_vk, ordinal, wined3d_creation_flags); 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) if (id_properties.deviceLUIDValid)
luid = (LUID *)id_properties.deviceLUID; 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)) if (!wined3d_adapter_init(adapter, ordinal, luid, &wined3d_adapter_vk_ops))
{ {