vk: Use driver API version for instance creation#342
Merged
Conversation
Use the version reported by vkEnumerateInstanceVersion instead of vk::HEADER_VERSION_COMPLETE when creating the Vulkan instance. On systems where the driver only supports Vulkan 1.1 or 1.2 (e.g. lavapipe on RHEL 8), requesting the ash header version (1.3.x) causes ERROR_INCOMPATIBLE_DRIVER. driver_api_version is already queried and used for extension promotion checks in the same function. Fixes kvark#341
kvark
reviewed
Apr 16, 2026
| .engine_name(c"blade") | ||
| .engine_version(1) | ||
| .api_version(vk::HEADER_VERSION_COMPLETE); | ||
| .api_version(driver_api_version); |
Owner
There was a problem hiding this comment.
we should take minimum of ours and theirs, not just theirs
Contributor
Author
There was a problem hiding this comment.
oh yeah, changed it!
Take the minimum of driver_api_version and vk::HEADER_VERSION_COMPLETE so we never request a version newer than our ash headers support, while still capping at the driver version on older systems.
Contributor
Author
|
changed it to use the min version between the two |
kvark
approved these changes
Apr 17, 2026
kvark
enabled auto-merge (squash)
April 17, 2026 15:06
Owner
|
Ah, I should have included this in 0.8.3. release |
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.
Use the version reported by
vkEnumerateInstanceVersioninstead ofvk::HEADER_VERSION_COMPLETEwhen creating the Vulkan instance.On systems where the driver only supports Vulkan 1.1 or 1.2 (e.g. lavapipe on RHEL 8), requesting the ash header version (1.3.x) causes
ERROR_INCOMPATIBLE_DRIVER. The spec says conformant 1.1+ implementations must not return this error, but older Mesa builds do.driver_api_versionis already queried viatry_enumerate_instance_version()and used for extension promotion checks in the same function. This matches what wgpu-hal does for instance creation.Fixes #341