Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
memset( &ctx->gpu, 0, sizeof(ctx->gpu) ); ctx->gpu.index = ctx->gpu_count;
- if ((vulkan_gpu = find_vulkan_gpu_from_uuid( ctx, vulkan_uuid )))
TRACE( "Found vulkan GPU matching uuid %s, pci_id %#04x:%#04x, name %s\n", debugstr_guid(&vulkan_gpu->uuid),
pci_id->vendor, pci_id->device, debugstr_a(vulkan_gpu->name));
- else if ((vulkan_gpu = find_vulkan_gpu_from_pci_id( ctx, pci_id )))
I don't feel comfortable with matching with PCI IDs or just the random Vulkan device here. Even with PCI IDs you can have two or more GPUs of the same spec. The PCI ID must be unique to use as a fallback. So you shouldn't use the PCI IDs to match devices when there are two GPUs of the same model. But then again, I don't think there is a good solution to this. The root cause is that we don't have the infrastructure to do it properly. We need something like hardware device paths to correctly implement this. Can we not match a GPU to a Vulkan GPU if matching by UUID fails? Add then we consider the rest of Vulkan GPUs not added as offscreen and add them later. Would that work?