GPU (macOS): update how integrated GPUs are detected

This commit is contained in:
李通洲
2024-09-29 09:05:22 +08:00
committed by Carter Li
parent 51796de69a
commit 5381395c54
+1 -1
View File
@@ -65,7 +65,7 @@ const char* ffGpuDetectMetal(FFlist* gpus)
else if ([device supportsFamily:MTLGPUFamilyCommon1])
ffStrbufSetStatic(&gpu->platformApi, "Metal Common 1");
gpu->type = device.hasUnifiedMemory ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE;
gpu->type = device.location == MTLDeviceLocationBuiltIn ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE;
gpu->index = (uint32_t) device.locationNumber;
#endif
}