Skip to content

Commit 1901b93

Browse files
committed
GPU: use adapterLuid as deviceID for non-pci devices
1 parent a7c7493 commit 1901b93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/detection/gpu/gpu_windows.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
9292
gpu->shared.total = sharedSystemMemory;
9393
}
9494

95-
ffRegReadUint64(hDirectxKey, L"AdapterLuid", &adapterLuid, NULL);
95+
if (ffRegReadUint64(hDirectxKey, L"AdapterLuid", &adapterLuid, NULL))
96+
{
97+
if (!gpu->deviceId) gpu->deviceId = adapterLuid;
98+
}
9699

97100
uint32_t featureLevel = 0;
98101
if(ffRegReadUint(hDirectxKey, L"MaxD3D12FeatureLevel", &featureLevel, NULL) && featureLevel)

0 commit comments

Comments
 (0)