diff --git a/src/detection/gpu/gpu_apple.c b/src/detection/gpu/gpu_apple.c index 5d4d05eae..413e65746 100644 --- a/src/detection/gpu/gpu_apple.c +++ b/src/detection/gpu/gpu_apple.c @@ -67,13 +67,25 @@ const char* ffDetectGPUImpl(FFlist* gpus, const FFinstance* instance) if(!ffCfDictGetInt(properties, CFSTR("vendor-id"), &vendorId)) { if(vendorId == 0x106b) + { ffStrbufAppendS(&gpu->vendor, FF_GPU_VENDOR_NAME_APPLE); + gpu->type = FF_GPU_TYPE_INTEGRATED; + } else if(wmemchr((const wchar_t[]) {0x1002, 0x1022}, (wchar_t)vendorId, 2)) + { ffStrbufAppendS(&gpu->vendor, FF_GPU_VENDOR_NAME_AMD); + gpu->type = FF_GPU_TYPE_DISCRETE; // Apple never used AMD CPUs + } else if(wmemchr((const wchar_t[]) {0x03e7, 0x8086, 0x8087}, (wchar_t)vendorId, 3)) + { ffStrbufAppendS(&gpu->vendor, FF_GPU_VENDOR_NAME_INTEL); + gpu->type = FF_GPU_TYPE_INTEGRATED; + } else if(wmemchr((const wchar_t[]) {0x0955, 0x10de, 0x12d2}, (wchar_t)vendorId, 3)) + { ffStrbufAppendS(&gpu->vendor, FF_GPU_VENDOR_NAME_NVIDIA); + gpu->type = FF_GPU_TYPE_DISCRETE; + } } ffStrbufInit(&gpu->driver);