Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to enable Metal on older Macs #1588

Merged
merged 1 commit into from
Jun 2, 2024
Merged

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented May 30, 2024

Metal was introduced in OS X 10.11 El Capitan, so the framework doesn't exist on older Apple systems. Instead of trying to unconditionally use it on Apple devices, check for the framework first.

Note: Metal still only works with the Xcode project generator, and not with Makefiles/Ninja because CMake doesn't yet know how to handle the metal shaders.

@dpogue dpogue requested a review from colincornaby May 30, 2024 06:32
@dpogue dpogue changed the title Don't try to enable metal on older Macs Don't try to enable Metal on older Macs May 30, 2024
@colincornaby
Copy link
Contributor

I think technically the fix is to check the macOS SDK version. That would handle the edge case you mentioned. We only want to try to build Metal when the macOS 10.11 SDK is present.

Unfortunately that's sent me down a Stack Overflow rabbit hole on how to check for that. Let me dig a little deeper. Ideally we'd detect for the Metal SDK just like we would for the Direct3D SDK or any other library.

@dpogue dpogue merged commit a89e627 into H-uru:master Jun 2, 2024
17 checks passed
@dpogue dpogue deleted the metal-version branch June 2, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants