From 8372708f98e07f5378a5ab7114b3763391ebfa13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 12 Jul 2025 22:13:59 +0800 Subject: [PATCH] GPU (Intel): prefer matching GPU with bus id --- src/detection/gpu/gpu_intel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/detection/gpu/gpu_intel.c b/src/detection/gpu/gpu_intel.c index c440c7207..59f268930 100644 --- a/src/detection/gpu/gpu_intel.c +++ b/src/detection/gpu/gpu_intel.c @@ -89,19 +89,19 @@ const char* ffDetectIntelGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverRe if (properties.device_type != CTL_DEVICE_TYPE_GRAPHICS) continue; - if (cond->type & FF_GPU_DRIVER_CONDITION_TYPE_LUID) + if (cond->type & FF_GPU_DRIVER_CONDITION_TYPE_BUS_ID) { - if (cond->luid == deviceId) + if (cond->pciBusId.bus == properties.adapter_bdf.bus && + cond->pciBusId.device == properties.adapter_bdf.device && + cond->pciBusId.func == properties.adapter_bdf.function) { device = devices[iDev]; break; } } - else if (cond->type & FF_GPU_DRIVER_CONDITION_TYPE_BUS_ID) + else if (cond->type & FF_GPU_DRIVER_CONDITION_TYPE_LUID) { - if (cond->pciBusId.bus == properties.adapter_bdf.bus && - cond->pciBusId.device == properties.adapter_bdf.device && - cond->pciBusId.func == properties.adapter_bdf.function) + if (cond->luid == deviceId) { device = devices[iDev]; break;