GPU (macOS): fix build error in MacOS 10.13 (#1556)
Some checks are pending
CI / spellcheck (push) Waiting to run
CI / No-features-test (push) Waiting to run
CI / Linux-amd64 (push) Waiting to run
CI / Linux-aarch64 (push) Waiting to run
CI / Linux-armv7l (push) Waiting to run
CI / Linux-armv6l (push) Waiting to run
CI / Linux-riscv64 (push) Waiting to run
CI / Linux-ppc64le (push) Waiting to run
CI / Linux-s390x (push) Waiting to run
CI / Musl-amd64 (push) Waiting to run
CI / macOS-universal (push) Waiting to run
CI / SunOS-amd64 (push) Waiting to run
CI / FreeBSD-amd64 (push) Waiting to run
CI / DragonFly-amd64 (push) Waiting to run
CI / OpenBSD-amd64 (push) Waiting to run
CI / NetBSD-amd64 (push) Waiting to run
CI / Windows-amd64 (push) Waiting to run
CI / Release (push) Blocked by required conditions

* Fix build error in MacOS 10.13

* Update gpu_apple.m

---------

Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
This commit is contained in:
Shu Niu 2025-02-11 14:15:32 +08:00 committed by GitHub
parent 08cd4ac1ee
commit bf707c2e94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,10 +67,10 @@ const char* ffGpuDetectMetal(FFlist* gpus)
gpu->type = device.location == MTLDeviceLocationBuiltIn ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE;
gpu->index = (uint32_t) device.locationNumber;
#endif
if (device.hasUnifiedMemory && device.recommendedMaxWorkingSetSize > 0)
gpu->shared.total = device.recommendedMaxWorkingSetSize;
#endif
}
return NULL;
}