GPU (macOS): update how integrated GPUs are detected

This commit is contained in:
李通洲 authored and Carter Li committed 2024-09-29 10:24:15 +08:00
1 parent 51796de69a
commit 5381395c54
1 file changed
+1 -1
+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
}