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

Build Vulkan Loader native package for win-arm64 #2090

Closed
alexrp opened this issue Apr 14, 2024 · 8 comments · Fixed by #2143
Closed

Build Vulkan Loader native package for win-arm64 #2090

alexrp opened this issue Apr 14, 2024 · 8 comments · Fixed by #2143
Labels
Milestone

Comments

@alexrp
Copy link
Collaborator

alexrp commented Apr 14, 2024

Depends on this upstream PR being merged and released: KhronosGroup/Vulkan-Loader#1469

@alexrp alexrp added the enhancement New feature or request label Apr 14, 2024
@alexrp alexrp self-assigned this Apr 14, 2024
@alexrp alexrp mentioned this issue Apr 14, 2024
38 tasks
@alexrp
Copy link
Collaborator Author

alexrp commented Apr 14, 2024

Unfortunately, nothing is ever easy.

We 'need' to build Vulkan Loader with the ClangCL toolset because it's the only way to build the Arm64 assembly. Not doing so trips this warning:

https://github.com/KhronosGroup/Vulkan-Loader/blob/77d1f9803624eafdf4dd8e51b2417c737574bb66/loader/CMakeLists.txt#L125-L128

Is that warning a problem? Who knows. It's up to the phase of the moon and the mood of the C compiler.

The issue is that VS ships with ClangCL toolsets for each build machine architecture. So there's an x86, x64, and Arm64 toolset. But you can only run the x64 and x86 (under WoW64) toolsets on e.g. a GitHub Actions runner. And I don't see any obvious way to cross-compile. So unless we can get our hands on a Windows Arm64 runner, I think we're out of luck.

I can of course just make the Windows Arm64 build use MSVC instead and we just pray that the tail call elimination kicks in. @Perksey @Beyley any thoughts?

@Perksey
Copy link
Member

Perksey commented Apr 14, 2024

zig cc

@alexrp
Copy link
Collaborator Author

alexrp commented Apr 14, 2024

Might be possible. 🤔 I'll check first if it can be done with a CMake toolchain file pointing to zig cc.

If that's too annoying to do, we might have to make a proper build.zig like was done for the other dependencies that are built with Zig. That's a slightly more involved project that I don't have time for currently, though, so I'll leave it up for grabs if it comes to that.

@alexrp
Copy link
Collaborator Author

alexrp commented Apr 15, 2024

Some early findings: zig cc with CMake should be possible, but it's a pain in the ass going Linux -> Windows Arm64 due to resource compiler nonsense. Will have to do it on Windows.

@alexrp
Copy link
Collaborator Author

alexrp commented Apr 15, 2024

Upstream PR has been merged. We need to actually update our Vulkan Loader submodule to a newer tag (once available) since we need multiple build system changes that were made since v1.3.280.

@Perksey
Copy link
Member

Perksey commented Apr 15, 2024

I think we should just point at an untagged SHA, seeing as a new tag implies we need to update our bindings again and I don't think there's appetite for that.

@alexrp
Copy link
Collaborator Author

alexrp commented Apr 15, 2024

Unfortunately we're already a tag behind: https://github.com/KhronosGroup/Vulkan-Loader/releases/tag/v1.3.281

So it seems like we'll have to do that anyway?

@Perksey
Copy link
Member

Perksey commented Apr 15, 2024

Ah okay, so our Vulkan Loader version is behind our Vulkan Headers version. So no update needed, phew!

@alexrp alexrp removed the upstream label Apr 18, 2024
@alexrp alexrp added this to the 2.X milestone Apr 18, 2024
@alexrp alexrp removed their assignment Apr 22, 2024
Perksey added a commit that referenced this issue Apr 23, 2024
* Fix #2026

* Fix #2000, closes #2005

* Fix #2010

* Fix added AL bug (good thing we had tests!)

* Fix #1500

* Undo any unintentional changes

* Add nint overloads for things like VertexAttribPointer

* Fix build errors

* Add more standard cursor shapes

* Upversion natives where necessary

* Patch notes for 2.21

* Reorder literally a single line

* Incorporate #2143/#2066/#2090 in patch notes

* Implement IsExtensionPresent for WGL

* nit

* OpenXR updates?

* Fix flawed constant parsing for Vk/XR

* Add openxr to patch notes

* Update patch notes for 2.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment