GPU: apply GPU type selection logic to Windows

This commit is contained in:
李通洲
2023-01-12 22:19:14 +08:00
parent 1a710e4094
commit 53c6a0ec9f
+2 -2
View File
@@ -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;