Zhiyi Zhang (@zhiyi) commented about dlls/win32u/d3dkmt.c:
+} + +BOOL get_vulkan_gpu_info( const struct pci_id *pci, UINT index, GUID *uuid, char **name ) +{ + VkPhysicalDeviceIDProperties id = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES}; + VkPhysicalDeviceProperties2 properties2 = {.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, .pNext = &id}; + VkPhysicalDevice *devices, device; + UINT count; + + if (!d3dkmt_use_vulkan()) return FALSE; + if (!(count = get_vulkan_physical_devices( &devices ))) return FALSE; + + if (!(device = get_physical_device_from_pci( pci, devices, count ))) + { + if (index >= count) return FALSE; + device = devices[index]; Using GPU index to index Vulkan devices doesn't make any sense. This is pretty much just returning a random Vulkan device when querying PCI ID fails. Unfortunately, I don't have a good solution for this. But I would prefer not to return a random Vulkan device in this case. We may have to fallback to using zero UUID when querying PCI ID fails.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5616#note_70367