Repository navigation
macOS: Fall back to Metal when Vulkan is not compiled in - #125915
Open
adamdmcbride wants to merge 1 commit into
Open
adamdmcbride wants to merge 1 commit into
adamdmcbride wants to merge 1 commit into
Conversation
When a project sets `rendering/rendering_device/driver.macos` to `vulkan` and the engine was built with `vulkan=no` (as official Apple Silicon builds were in 4.8 rc1), no rendering context was created and the editor and exported projects crashed on startup. Switch to Metal in that case, as Intel builds already switch from Metal to Vulkan. Fixes godotengine#125896. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Please take a look at the guidelines, AI authored PRs are not accepted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #125896.
What problem(s) does this PR solve?
When a project sets
rendering/rendering_device/driver.macostovulkanand the engine was built withvulkan=no(as the official Apple Silicon builds of 4.8 rc1 were, and as godotengine/godot-build-scripts#180plans for 4.9),
DisplayServerMacOScreates no rendering context and no rasterizer, and the editorand exported projects crash on startup with signal 11.
This PR switches to Metal in that case and prints a warning, mirroring the existing Intel fallback in
the same function (Metal to Vulkan). The
--rendering-driver vulkancommand-line option is unchanged:it still stops with "Unknown rendering driver" because
main.cppchecks it against the compileddrivers.
Testing
Apple M3 Max, macOS 27.2. MRP: a project with only
rendering_device/driver.macos="vulkan"and amain scene that prints the current driver after 30 frames and quits (the same setting as the MRP in
#125896). Each run used a fresh
HOME.v4.8.rc1.official.7c97c2977)-e)master(7c97c29),vulkan=no angle=no, without this PRMetal 4.0 - Forward+; the scene printsdriver=metal, exit 0-e --quit-after 300)--rendering-driver vulkan--rendering-driver metalBuilds with
vulkan=yescompile the new block out, so they are unaffected.Note
AI disclosure: an AI assistant (Claude) analysed the issue, wrote this change and ran the tests, under
my direction. I reviewed the code.