macOS version compatibility
thomasreiser opened this issue · comments
I think it has to be clarified what the minimal supported macOS version is.
The readme says 11+ but there was a commit on 18.08.2023 (5f564db0d5338c7204efc060ba82b41d80f3682a) that breaks compatibility with macOS 11:
The commit removed the deprecated MTLArgument and replaced it with MTLBinding which requires macOS 13.
Example log corresponding to this issue:
[cmake] [239/701] cxx ../../../osx-arm64/obj/x64/Debug/bgfx/src/renderer_mtl.o
[cmake] ../../../../src/renderer_mtl.mm:1934:17: warning: 'MTLBinding' is only available on macOS 13.0 or newer [-Wunguarded-availability-new]
[cmake] , NSArray<id>* _vertexArgs
[cmake] ^
[cmake] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h:342:11: note: 'MTLBinding' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 11.7.0
Yes, I was planning to add actually minimum required error in bx/platform.h to inform user about it, but didn't have time to test it...
Something like this:
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1300 \
#error "Minimum require macOS version 13.0"
#endif //...
If you could stick that somewhere in bx/platform.h and test it I could get it added ASAP.
Fixed: bkaradzic/bx@90d7e77