Skip to content

Conversation

@fanc999-1
Copy link
Contributor

There now exists a Windows Vulkan SDK for ARM64, and the latest Vulkan SDKs for x64 Windows also provides ARM64 libraries and binaries for cross-builds (and vice-versa).

So, now we have the following in the Vulkan SDKs:

  • Bin-ARM64 and Lib-ARM64 in x64 Windows SDKs that contains ARM64 Vulkan binaries and libraries.
  • Bin-X64 and Lib-X64 in ARM64 Windows SDKs that contains x64 Vulkan binaries and libraries
  • SDKs after 1.4.x (or so) no longer ships 32-bit Windows binaries and libraries.

This updates the Vulkan detection logic to account for these differences so that the correct library is picked up upon linking on Windows, especially when cross-compiling ARM64 binaries on x64 Windows, and vice versa, while maintaining compatibility with native and 32-bit builds.

With blessings, thank you!

@fanc999-1 fanc999-1 requested a review from jpakkane as a code owner November 18, 2025 07:35
Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small nits here, but otherwise this looks good to me.

@dcbaker dcbaker added this to the 1.10 milestone Nov 18, 2025
Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! this is looking really good, I'm still hoping to get this in for 1.10, and I have one small thing I think can be improved here.

unsupported_target_arch = True

if unsupported_target_arch:
raise DependencyException('Target architecture \'%s\' is not supported for this Vulkan SDK.' % host_cpu)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise DependencyException('Target architecture \'%s\' is not supported for this Vulkan SDK.' % host_cpu)
raise DependencyException(f'Target architecture \'{host_cpu}\' is not supported for this Vulkan SDK.')

We prefer f-strings for simple substitutions or str.format() for complex ones.

Ah, you thought of more error cases than I did, I only noticed the build_cpu being unsupported I think it would be simpler to set lib_dir to some initial sentinel value like lib_dir = '' and then check for that at the end for the error condition.

There now exists a Windows Vulkan SDK for ARM64, and the latest Vulkan
SDKs for x64 Windows also provides ARM64 libraries and binaries for
cross-builds (and vice-versa).

So, now we have the following in the Vulkan SDKs:

* Bin-ARM64 and Lib-ARM64 in x64 Windows SDKs that contains ARM64
  Vulkan binaries and libraries.
* Bin-X64 and Lib-X64 in ARM64 Windows SDKs that contains x64 Vulkan
  binaries and libraries
* SDKs after 1.4.x (or so) no longer ships 32-bit Windows binaries and
  libraries.

This updates the Vulkan detection logic to account for these differences
so that the correct library is picked up upon linking on Windows,
especially when cross-compiling ARM64 binaries on x64 Windows, and vice
versa, while maintaining compatibility with native and 32-bit builds.
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.

2 participants