docs: pin down what vulkan_host()'s version actually is - #23
Merged
Conversation
api_version is the highest version any installed driver advertises in its ICD manifest, which is neither of the two numbers it resembles: not the loader's instance version (what vulkaninfo prints, usually newer), and not any single device's apiVersion. Both of those need an instance and a call into the loader, which this crate does not link. Also note that Vulkan's patch is the spec header revision, so callers should gate on major/minor. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Verifying the probe on an AMD APU turned up a number that is easy to misread:
vulkan_host()reported1.4.354wherevulkaninfoon the same machine printed1.4.357. Both are correct — they are different numbers — but nothing in the docs said which one we report.api_versionis the highest version any installed driver advertises in its ICD manifest, a static declaration on disk. That is neither of the two numbers it resembles:vulkaninfoandvkEnumerateInstanceVersionreport, usually the newer of the two. The driver's is the one that binds in practice, since loaders track current headers while drivers implement features on their own schedule. The loader only constrains when the two are sourced separately, e.g. a container whose base image carries a stale loader against bind-mounted drivers.apiVersion— with two drivers installed this is the higher of what they advertise and may describe neither card. Per-device versions needvkGetPhysicalDeviceProperties, which means linking the loader and creating an instance; that is the trade this crate exists not to make.Also documents that Vulkan's patch is the spec header revision rather than a feature level, so callers should gate on
major/minor— a patch-sensitive check only rejects builds that would have run.Docs only, no behaviour change. Touches
VulkanHost::api_version,VulkanVersion,vulkan_host(), thevulkanmodule header, and the README's host-toolchain section, following #20 in keeping specific hardware out of the prose.🤖 Generated with Claude Code