diff --git a/src/detection/gpu/gpu_windows.cpp b/src/detection/gpu/gpu_windows.cpp index 41eab75cc..07b711205 100644 --- a/src/detection/gpu/gpu_windows.cpp +++ b/src/detection/gpu/gpu_windows.cpp @@ -26,8 +26,6 @@ static const char* detectWithDxgi(FFlist* gpus) FFGPUResult* gpu = (FFGPUResult*)ffListAdd(gpus); - gpu->type = FF_GPU_TYPE_UNKNOWN; - if(wmemchr((const wchar_t[]) {0x1002, 0x1022}, (wchar_t)desc.VendorId, 2)) ffStrbufInitS(&gpu->vendor, FF_GPU_VENDOR_NAME_AMD); else if(wmemchr((const wchar_t[]) {0x03e7, 0x8086, 0x8087}, (wchar_t)desc.VendorId, 3)) @@ -42,6 +40,8 @@ static const char* detectWithDxgi(FFlist* gpus) ffStrbufInit(&gpu->driver); + gpu->type = desc.DedicatedVideoMemory >= 1024 * 1024 * 1024 ? FF_GPU_TYPE_DISCRETE : FF_GPU_TYPE_INTEGRATED; + adapter->Release(); gpu->temperature = FF_GPU_TEMP_UNSET;