-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Fix building with use_volk=yes
on MacOS
#93331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have not tested it, but it probably can be set without if env["use_volk"]:
, and for both iOS and macOS.
9c20199
to
18eb78b
Compare
Ah, I haven't tested building for iOS, but looking at In my latest push, the define is set without EDIT: I just tested building for iOS with |
18eb78b
to
e018eab
Compare
I added some other minor changes that appear to be necessary to actually run Godot normally when loading MoltenVK via Volk - there's a flag and extra extension needed. (It was working in my testing before because I was running a test project using the Meta XR Simulator, which apparently doesn't care about this extension and flag. However, when running Godot without using the Meta XR Simulator, these extra changes are needed.) Some docs about the flag and extension: I'm not sure why this isn't needed when not loading via Volk, though. |
Looking into this a little more, I think I now understand why that extension isn't needed when MoltenVK is statically linked. From the MoltenVK docs: That extension is only used by the Vulkan loader, and when MoltenVK is statically linked, there's no proper Vulkan loader involved. However, since this PR is about getting Godot working with Volk (a Vulkan loader!), it is needed in this case. In fact, if we attempt to use that extension when not using Volk (ie when statically linking MoltenVK), then So, I'm a little bit more confident about that change in this PR! |
Thanks! |
Without the change in this PR, running
scons platform=macos arch=arm64 dev_build=yes use_volk=yes
I get these errors:With the changes in this PR, compilation succeeds, and loading MoltenVK via Volk seems to work in my testing!
However, I'm not terribly knowledgeable of either MacOS or Vulkan, so I'm not sure if this is the correct fix, or I've got some issue on my system.