[PATCH] wined3d: Use wined3d_get_primary_adapter_luid() if we didn't get a valid LUID from Vulkan.
Henri Verbeet
hverbeet at codeweavers.com
Wed Oct 14 05:37:07 CDT 2020
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
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))
{
--
2.20.1
More information about the wine-devel
mailing list